semvec/pypi-packages huggingface dataset:
bsv 0.4.2
spider project to get buy_sell_volume from 4 Futures Exchanges in Chinese Mainland
Requires Python: >=3.6

主要功能
-------------
下载国内四大期货交易所历史成交与持仓排名数据。



脚本执行时间
-------------

- 交易所与期货公司结算步骤完成后，网站公布当天数据。若结算延迟，则可能影响数据的正常发布；

- 如果进行每日更新，则更新脚本的启动时间设置在当日下午五点之后，非交易日无数据。



交易所数据区别
----------------

2020年1月1日前，商品期货数据统计口径均按双边计算，金融期货按单边计算；之后均按单边计算。

- CFFEX

  同一交易日所有品种持仓排名数据不在同一个页面呈现，以各自品种分开呈现；

- INE

  暂无SC品种成交持仓排名数据公布；

- DCE

  通过下载压缩包并解析txt文件来获取单个交易日数据，但部分交易日压缩包无数据；

  2008-08-28, 2011-12-02, 2013-11-27, 2013-11-28, 2013-11-29, 

  2016-01-04, 2016-01-07, 2018-04-09, 2018-05-02

- CZCE

  网页结构不统一，需要区别对待，公布品种级别的汇总数据。



交易所公布标准
--------------

- SHFE
    http://www.shfe.com.cn/statements/decl/911319239.html
- CFFEX
    单边持仓达到1万手以上（含）和当月合约前20名结算会员的成交量、持仓量
- DCE
    根据相关规则，期货品种信息公布活跃月份（双边持仓量大于、等于2万手）合约，期权品种信息公布活跃月份（标的期货合约双边持仓量大于、等于2万手）合约系列 。
- CZCE
    暂无，待补充。



变量名称
------------

``交易所`` 

缩写 | 英文全称 | 中文全称 
:-: | :-: |:-: 
SHFE | Shanghai Futures Exchange| 上海期货交易所 
CFFEX | China Financial Futures Exchange| 中国金融期货交易所 
DCE | Dalian Commodity Exchange| 大连商品交易所 
CZCE | Zhengzhou Commodity Exchange| 郑州商品交易所 

``代码字段`` 

| 代码 |  字段  |
| :--: | :----: |
|  hp  | 持仓量 |
|  v   | 成交量 |
|  b   | 买持量 |
|  s   | 卖持量 |

``返回字段`` 

| 代码     |      字段      | python格式 |
| :------- | :------------: | ---------: |
| tday     |     交易日     |        str |
| ex       |     交易所     |        str |
| code     |    品种代码    |        str |
| product  |    品种中文    |        str |
| contract |    合约代码    |        str |
| symbol   | 成交/买持/卖持 |        str |
| rank     |      排名      |        int |
| member   |    会员单位    |        str |
| value    |    合约手数    |        int |
| Change   |     变化量     |        int |

``样例代码``

- 下载交易日数据

    ```python
    from downloader import hp_shfe, hp_cffex, hp_dce, hp_czce

    trading_day = '20190701'  # 日期格式必须为%Y%m%d

    for row in hp_shfe(trading_day):
        print(row)

    for row in hp_cffex(trading_day):
        print(row)

    for row in hp_dce(trading_day):
        print(row)

    for row in hp_czce(trading_day):
        print(row)
    ```

- dce压缩包无数据时，使用该交易日前后各三个交易日的所有合约列表进行post访问

    ```python
    from downloader import hp_dce_post
    trading_day = '20190701'
    code = 'A'
    contract = 'A1909'
    product = '豆一'

    for row in hp_dce_post(trading_day, code, contract, product):
        print(row)
    ```
airline 0.5.1
Lightweight wide event logging to bring more observability to lambda functions.

# airline

![tests](https://github.com/namelessjon/airline/workflows/tests/badge.svg) | [![PyPI version](https://badge.fury.io/py/airline.svg)](https://pypi.org/project/airline/)

Lightweight wide event logging to bring more observability to lambda functions.

This is very strongly inspired by [honeycomb](https://honeycomb.io) and their [beeline](https://github.com/honeycomb/beeline-python) library.

## How?

Use the decorators!

```python
import airline

airline.init(dataset='your_app_name')


@airline.evented()
def some_function(a, b)
    # do things
```

or 

```python
import airline
from airline.awslambda import airline_wrapper


airline.init(dataset='function_or_app_name')


@airline_wrapper
def handler(event, context):
    # do things
```


## Wide event logging?

The idea is to build up the full context of a function/script into one wide
event that gets emitted at the end.  This puts all the context in one log
message, making it very easy to run analytics on, find like errors, and a lot
of other things.  A full blown observability platform like honeycomb would be
more informative, and allows for the notion of spans and distributed tracing
(i.e. across different (micro) services and the like).

But this is a start.

Take this:

```python
import time
import random

import airline

airline.init(dataset='example')



@airline.evented()
def main(a, b):
    airline.add_context_field("a", a)
    airline.add_context_field("b", b)

    with airline.timer('processing_a'):
        subfunction1(a)

    with airline.timer('processing_b'):
        subfunction1(b)


def subfunction1(input):
    time.sleep(random.uniform(0, len(input)))


main("foo", "example_long_thing")
```

And emit this at the end

```json
{
  "time": "2020-03-09T09:49:43.376126Z",
  "dataset": "example",
  "client": "airline/0.1.0",
  "data": {
    "a": "foo",
    "b": "example_long_thing",
    "duration_ms": 9438.041,
    "timers": {
      "processing_a_ms": 255.11,
      "processing_b_ms": 9182.859
    }
  }
}
```
covid19-morocco 0.0.2
A Python Package to get covid19 Cases for Morocco in Real Time
Requires Python: >=3.6

# Covid19 Cases Tracking in Morocco in Real Time 

## about

A small package of Python to access and track the number of cases of confirmed and deaths and  recovered people
from the Coronavirus for Morocco

# Installation

```
pip install covid19_morocco
or in colab google cloud
!pip install covid19_morocco
```

## Usage

```
from covid19_morocco import covid19
country_name=Morocco #name of country 
```

```
# to get confirmed count for country in real time
confirmed_count=covid19.confirmed_people()
#to get deaths count for country in real time 
deaths_count=covid19.deaths_people()
#to get recoverd count in real time 
recoverd_count=covid19.recoverd_people()
# to get confirmed cases by regions (SoussMassa, CasaSettat, FesMeknes, MarrakechSafi,....)
confirmed_by_regions=covid19.confirmed_people_regions(regions)
#Plot cases 
covid19.plot_cases()
#Plot histogram
covid19.hist_cases()
```

## Checking

To verify the retrieved data within this library
go to worldmeters web site for checking for any coutry

https://www.worldometers.info/coronavirus

plot cases
https://raw.githubusercontent.com/aboullaite/Covid19-MA/master/stats/MA-times_series.csv