用于iqvia数据的干净的、以异步为中心的python3 api
pyiqvia的Python项目详细描述
pyiqvia:iqvia™的干净的、以异步为中心的python3 api
pyiqvia
是一个面向过敏原、哮喘和疾病的异步python3库
来自IQVIA™系列网站的数据(例如
https://pollen.com、https://flustar.com等)。
python版本
pyiqvia
当前在上受支持:
- Python3.5
- python 3.6
- Python3.7
但是,运行测试套件当前需要Python3.6或更高版本;测试 在Python3.5上运行将失败。
安装
pipinstallpyiqvia
用法
pyiqvia
从
aiohttpClientSession
:
importasynciofromaiohttpimportClientSessionfrompyiqviaimportClientasyncdefmain()->None:"""Create the aiohttp session and run the example."""asyncwithClientSession()aswebsession:# YOUR CODE HEREasyncio.get_event_loop().run_until_complete(main())
创建一个客户端并访问它:
importasynciofromaiohttpimportClientSessionfrompyiqviaimportClientasyncdefmain()->None:"""Create the aiohttp session and run the example."""asyncwithClientSession()aswebsession:client=Client(80012,websession)# ZIP codes starting with 0 need to be provided as strings:client=Client('00544',websession)# Get current allergen information:awaitclient.allergens.current()# Get more information on the current allergen outlook:awaitclient.allergens.outlook()# Get extended forecast allergen information:awaitclient.allergens.extended()# Get historic allergen information:awaitclient.allergens.historic()# Get current asthma information:awaitclient.asthma.current()# Get extended forecast asthma information:awaitclient.asthma.extended()# Get historic asthma information:awaitclient.asthma.historic()# Get current cold and flu information:awaitclient.disease.current()# Get extended forecast cold and flu information:awaitclient.disease.extended()# Get historic cold and flu information:awaitclient.disease.historic()asyncio.get_event_loop().run_until_complete(main())
贡献
- Check for open features/bugs 或者initiate a discussion on one。
- Fork the repository。
- 安装开发环境:
make init
。 - 进入虚拟环境:
pipenv shell
- 编写新功能或错误修复代码。
- 编写一个涵盖新功能的测试。
- 运行测试并确保100%的代码覆盖率:
make coverage
- 加入
AUTHORS.md
。 - 提交拉取请求!