Skip to main content

调用 DIRestPlus 接口,实现Wind、iFinD、Choice接口调用

Project description

# DIRestInvoker [![Build Status](https://travis-ci.org/DataIntegrationAlliance/DIRestInvoker.svg?branch=master)](https://travis-ci.org/DataIntegrationAlliance/DIRestInvoker)
Data Integration RESTPlus Invoker,调用 [DIRestPlus](https://github.com/DataIntegrationAlliance/DIRestPlus) 接口,实现Wind、iFinD、Choice接口调用

## 安装
```commandline
pip install DIRestInvoker
```

## iFinD接口调用举例
```python
from direstinvoker.ifind import IFinDInvoker, APIError
url_str = "http://localhost:5000/iFind/"
invoker = IFinDInvoker(url_str)
```

### THS_DateQuery
```python
try:
data_df = invoker.THS_DateQuery('SSE', 'dateType:0,period:D,dateFormat:0', '2018-06-15', '2018-06-21')
print(data_df)
except APIError as exp:
if exp.status == 500:
print('APIError.status:', exp.status, exp.ret_dic['message'])
else:
print(exp.ret_dic.setdefault('error_code', ''), exp.ret_dic['message'])
```

## 修改历史

* version 0.1.4

> THS_BasicData 支持 list 作为 thsCode 参数,并且支持按一定数量自动分割发送(解决大批量数据请求的情况下,20W数字限制,可能引发-205错误的问题)

----
项目地址:[DIRestInvoker](https://github.com/DataIntegrationAlliance/DIRestInvoker)


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

DIRestInvoker-0.2.0.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

DIRestInvoker-0.2.0-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file DIRestInvoker-0.2.0.tar.gz.

File metadata

  • Download URL: DIRestInvoker-0.2.0.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.13.0 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.5.5

File hashes

Hashes for DIRestInvoker-0.2.0.tar.gz
Algorithm Hash digest
SHA256 57bb17c3f8aa2991f524668e18fffe2dd3d32b790389035f3bb67e9c1b87d7d2
MD5 8cc6af55a81f495f65847e57d7c2e079
BLAKE2b-256 5e365dcc0d045a101eb7505e2a52cb6e7b8b296dd8fa0aa29c5386dbb134bd77

See more details on using hashes here.

File details

Details for the file DIRestInvoker-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: DIRestInvoker-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.13.0 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.5.5

File hashes

Hashes for DIRestInvoker-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb855140112c8e6d01af043836b5c6976fbeaaeb3a057aee0c1bf545e048bd69
MD5 3f5c2eb4395508b1607084fbbfe78960
BLAKE2b-256 0947217263626b3b390403c8fde0d707e256723ae2b17d95eaceee53e9873d1b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page