调用 DIRestPlus 接口,实现Wind、iFinD、Choice接口调用
Project description
# DIRestInvoker [](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'])
```
----
项目地址:[DIRestInvoker](https://github.com/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'])
```
----
项目地址:[DIRestInvoker](https://github.com/DataIntegrationAlliance/DIRestInvoker)
Project details
Release history Release notifications | RSS feed
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.1.1.tar.gz
(5.1 kB
view details)
Built Distribution
File details
Details for the file DIRestInvoker-0.1.1.tar.gz
.
File metadata
- Download URL: DIRestInvoker-0.1.1.tar.gz
- Upload date:
- Size: 5.1 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ae9415691fb6ac2e05787d6de0eb4a620a7a3769586a1024a7e9817ef879d68 |
|
MD5 | 2565621838e64b5b208bbf96da9eba43 |
|
BLAKE2b-256 | fb61ab8be348feef008b46881c64af56a0231b6235b90bf77766067585e297d4 |
File details
Details for the file DIRestInvoker-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: DIRestInvoker-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.9 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35dc592b0bd40cbeedb996335f13eed23bbb484e8314d3ef412cc3917852aef3 |
|
MD5 | 4c3383564bc511246e56a9c26fd8e75c |
|
BLAKE2b-256 | bbc4293a349814cae3913c4c4f39cef1e14c2458059449beb72118426738a16e |