调用 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.0.tar.gz
(5.0 kB
view details)
Built Distribution
File details
Details for the file DIRestInvoker-0.1.0.tar.gz
.
File metadata
- Download URL: DIRestInvoker-0.1.0.tar.gz
- Upload date:
- Size: 5.0 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 | 464f41ea83daa0dbf547b3922799a503786119a3149903a5c530b5f94cc6f89f |
|
MD5 | 8320b3eaad8310b74587b561358a7e96 |
|
BLAKE2b-256 | 341c36b371e47912ca7eb6581986aefac47e3784259b533138f3b3a42e86aa77 |
File details
Details for the file DIRestInvoker-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: DIRestInvoker-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.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/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.5.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bee0d69892b4666e39065038e120704732c6d534474fcbfd19167bfd60832e71 |
|
MD5 | a2d0cee7f2d06a3fad5ed2cc72718a63 |
|
BLAKE2b-256 | 496191348109044eb40d2fd13759734e8c1473fe42e11df89c0fab2f86de25b5 |