about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pyiqvia/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pyiqvia/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/pyiqvia/default.nix53
1 files changed, 53 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pyiqvia/default.nix b/nixpkgs/pkgs/development/python-modules/pyiqvia/default.nix
new file mode 100644
index 000000000000..762e39fe4b14
--- /dev/null
+++ b/nixpkgs/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 ];
+  };
+}