调用 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'])
```
----
项目地址:[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.2.tar.gz
(5.1 kB
view hashes)
Built Distribution
Close
Hashes for DIRestInvoker-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c33374ab1e9d7ef10989e191983b5bca00235fd2b6d1698f3a87b20cbed446c7 |
|
MD5 | 6c38a33e66d143330fbce719fa505488 |
|
BLAKE2b-256 | d0cfd8e67bbe647674cbdafe8906ad9bba64cb78ea97134c707ca9ff30231c8b |