1{
2 lib,
3 buildPythonPackage,
4 aiohttp,
5 aresponses,
6 backoff,
7 certifi,
8 fetchFromGitHub,
9 fetchpatch,
10 poetry-core,
11 pytest-aiohttp,
12 pytest-asyncio,
13 pytestCheckHook,
14 pythonOlder,
15 yarl,
16}:
17
18buildPythonPackage rec {
19 pname = "pyiqvia";
20 version = "2023.12.0";
21 format = "pyproject";
22
23 disabled = pythonOlder "3.9";
24
25 src = fetchFromGitHub {
26 owner = "bachya";
27 repo = "pyiqvia";
28 rev = "refs/tags/${version}";
29 hash = "sha256-qq6UQUz60WkmWqdmExlSQT3wapaHJr8DeH1eVrTOnpQ=";
30 };
31
32 nativeBuildInputs = [ poetry-core ];
33
34 propagatedBuildInputs = [
35 aiohttp
36 backoff
37 certifi
38 yarl
39 ];
40
41 __darwinAllowLocalNetworking = true;
42
43 nativeCheckInputs = [
44 aresponses
45 pytest-aiohttp
46 pytest-asyncio
47 pytestCheckHook
48 ];
49
50 disabledTestPaths = [
51 # Ignore the examples as they are prefixed with test_
52 "examples/"
53 ];
54
55 pythonImportsCheck = [ "pyiqvia" ];
56
57 meta = with lib; {
58 description = "Module for working with IQVIA data";
59 longDescription = ''
60 pyiqvia is an async-focused Python library for allergen, asthma, and
61 disease data from the IQVIA family of websites (such as https://pollen.com,
62 https://flustar.com and more).
63 '';
64 homepage = "https://github.com/bachya/pyiqvia";
65 changelog = "https://github.com/bachya/pyiqvia/releases/tag/${version}";
66 license = with licenses; [ mit ];
67 maintainers = with maintainers; [ fab ];
68 };
69}