用于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嵌套循环打印一个数字,旁边有相同数量的星号   java JodReports替代方案   java如何将模型类parcelable对象从片段传递到活动?   java JCS缓存删除功能不删除特定元素   如何打开。Java的dll文件。   java在这种情况下如何选择聚合根?   java从CellEditorListener获取编辑的TreeNode   Java到web服务和mysql   从openssl ec在Java中创建公钥时出现加密无效密钥异常   Java数组:添加多个数组的元素时忽略空数组   java在初始化后向fragment发送数据   JButtons的java数组正在返回void   若联接列不包含特定值,则java JPA条件生成器仅返回实体   java ActionBar问题:NPE   java Portlet是被广泛使用还是非常罕见?