调用 DIRestPlus 接口,实现Wind、iFinD、Choice接口调用
Project description
# DIRestInvoker
调用 [DIRestPlus](https://github.com/DataIntegrationAlliance/DIRestPlus) 接口,实现Wind、iFinD、Choice接口调用
## 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'])
```
调用 [DIRestPlus](https://github.com/DataIntegrationAlliance/DIRestPlus) 接口,实现Wind、iFinD、Choice接口调用
## 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'])
```
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.0.1.tar.gz
(3.9 kB
view details)
Built Distribution
File details
Details for the file DIRestInvoker-0.0.1.tar.gz
.
File metadata
- Download URL: DIRestInvoker-0.0.1.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.13.0 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.5.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 218cf73906a1323080f9ccb395eabe8f6b5a779f64e1df915a78f4a45029147f |
|
MD5 | 8870a58d3f1cb6bc5dd81db634e28c74 |
|
BLAKE2b-256 | 77e24923a38ce4a47f0b34f39a97ce008074cda3d6ac4e9b739f9dabb16f9e92 |
File details
Details for the file DIRestInvoker-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: DIRestInvoker-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.13.0 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.5.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f036292bf0745041aca2ec48eaa57a118c3b749c074df0a7932937f5fd822e9a |
|
MD5 | a5195896ee5e948d8d8a55c39b4bc328 |
|
BLAKE2b-256 | 908877fb0cf2c5317d32997f077988038baaac78d25d6fcf3c7b58cf69473d7d |