用于iqvia数据的干净的、以异步为中心的python3 api

pyiqvia的Python项目详细描述


pyiqvia:iqvia™的干净的、以异步为中心的python3 api

Travis CIPyPiVersionLicenseCode CoverageMaintainabilitySay Thanks

pyiqvia是一个面向过敏原、哮喘和疾病的异步python3库 来自IQVIA™系列网站的数据(例如 https://pollen.comhttps://flustar.com等)。

python版本

pyiqvia当前在上受支持:

  • Python3.5
  • python 3.6
  • Python3.7

但是,运行测试套件当前需要Python3.6或更高版本;测试 在Python3.5上运行将失败。

安装

pipinstallpyiqvia

用法

pyiqviaaiohttpClientSession

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())

贡献

  1. Check for open features/bugs 或者initiate a discussion on one
  2. Fork the repository
  3. 安装开发环境:make init
  4. 进入虚拟环境:pipenv shell
  5. 编写新功能或错误修复代码。
  6. 编写一个涵盖新功能的测试。
  7. 运行测试并确保100%的代码覆盖率:make coverage
  8. 加入AUTHORS.md
  9. 提交拉取请求!

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
“电话目录”数据结构的java实现   使用PC remote读取JSP页面上的文件时出现java错误   无法在不同目录中从Java执行Python脚本   java无法在windows 8.1上运行javafx应用程序   java航空公司系统如何防止两个用户同时预订同一个座位?   反射如何在java方法中获取每个参数的名称和值?   阅读中的字符串问题。txt文档并在Java中编辑   java JTextPane行包装问题   使用PowerMock Android Junit时出现java ClassNotFoundException   java输入和If语句   java如何在不使用剪贴板或操作CTRL+C、CTRL+V的情况下将字符串中的“\t”或“tab”发送到selenium中的文本框中   tomcat7将Java应用程序部署到Digitalocean中的Tomcat根目录   响应中嵌套映射的java问题(Jersey)