diff --git a/pkgs/development/python-modules/pyiqvia/default.nix b/pkgs/development/python-modules/pyiqvia/default.nix new file mode 100644 index 00000000000..762e39fe4b1 --- /dev/null +++ b/pkgs/development/python-modules/pyiqvia/default.nix @@ -0,0 +1,53 @@ +{ lib +, buildPythonPackage +, aiohttp +, aresponses +, fetchFromGitHub +, poetry +, pytest-aiohttp +, pytest-asyncio +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "pyiqvia"; + version = "0.3.1"; + format = "pyproject"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "bachya"; + repo = pname; + rev = version; + sha256 = "1yjsbq4p040a35n8g2l0wgnv83wkjirv4rj73s2mjzn3cxf395bz"; + }; + + nativeBuildInputs = [ poetry ]; + + propagatedBuildInputs = [ aiohttp ]; + + checkInputs = [ + aresponses + pytest-aiohttp + pytest-asyncio + pytestCheckHook + ]; + + # Ignore the examples as they are prefixed with test_ + pytestFlagsArray = [ "--ignore examples/" ]; + pythonImportsCheck = [ "pyiqvia" ]; + + meta = with lib; { + description = "Python3 API for IQVIA data"; + longDescription = '' + pyiqvia is an async-focused Python library for allergen, asthma, and + disease data from the IQVIA family of websites (such as https://pollen.com, + https://flustar.com and more). + ''; + homepage = "https://github.com/bachya/pyiqvia"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index c961ffe538c..110f749b390 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -398,7 +398,7 @@ "iperf3" = ps: with ps; [ ]; # missing inputs: iperf3 "ipma" = ps: with ps; [ ]; # missing inputs: pyipma "ipp" = ps: with ps; [ pyipp ]; - "iqvia" = ps: with ps; [ numpy ]; # missing inputs: pyiqvia + "iqvia" = ps: with ps; [ numpy pyiqvia ]; "irish_rail_transport" = ps: with ps; [ ]; # missing inputs: pyirishrail "islamic_prayer_times" = ps: with ps; [ ]; # missing inputs: prayer_times_calculator "iss" = ps: with ps; [ ]; # missing inputs: pyiss diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3f8a0fc7259..6e2a31c0751 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5360,6 +5360,8 @@ in { pyipp = callPackage ../development/python-modules/pyipp { }; + pyiqvia = callPackage ../development/python-modules/pyiqvia { }; + pyjet = callPackage ../development/python-modules/pyjet { }; pyjks = callPackage ../development/python-modules/pyjks { };