1{ lib
2, buildPythonPackage
3, aiohttp
4, aresponses
5, fetchFromGitHub
6, poetry-core
7, pytest-aiohttp
8, pytest-asyncio
9, pytestCheckHook
10, pythonOlder
11}:
12
13buildPythonPackage rec {
14 pname = "pyiqvia";
15 version = "0.3.3";
16 format = "pyproject";
17
18 disabled = pythonOlder "3.6";
19
20 src = fetchFromGitHub {
21 owner = "bachya";
22 repo = pname;
23 rev = version;
24 sha256 = "sha256-XYWoHKa/yq7MtGVM6eVgLtR2E3VmqsjX3TNcQcd7dEQ=";
25 };
26
27 nativeBuildInputs = [ poetry-core ];
28
29 propagatedBuildInputs = [ aiohttp ];
30
31 checkInputs = [
32 aresponses
33 pytest-aiohttp
34 pytest-asyncio
35 pytestCheckHook
36 ];
37
38 # Ignore the examples as they are prefixed with test_
39 pytestFlagsArray = [ "--ignore examples/" ];
40 pythonImportsCheck = [ "pyiqvia" ];
41
42 meta = with lib; {
43 description = "Python3 API for IQVIA data";
44 longDescription = ''
45 pyiqvia is an async-focused Python library for allergen, asthma, and
46 disease data from the IQVIA family of websites (such as https://pollen.com,
47 https://flustar.com and more).
48 '';
49 homepage = "https://github.com/bachya/pyiqvia";
50 license = with licenses; [ mit ];
51 maintainers = with maintainers; [ fab ];
52 };
53}