diff --git a/pkgs/development/python-modules/coinmetrics-api-client/default.nix b/pkgs/development/python-modules/coinmetrics-api-client/default.nix new file mode 100644 index 000000000000..5192ef131f5a --- /dev/null +++ b/pkgs/development/python-modules/coinmetrics-api-client/default.nix @@ -0,0 +1,42 @@ +{ buildPythonPackage, fetchPypi, lib, orjson, pandas, poetry-core +, pytestCheckHook, pytest-mock, pythonOlder, python-dateutil, requests, typer +, websocket-client }: + +buildPythonPackage rec { + pname = "coinmetrics-api-client"; + version = "2022.8.29.6"; + format = "pyproject"; + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-EPPRKOdFbLLYw0K5C4nojR8GueekoFW7xIlwKeSV1EY="; + }; + + nativeBuildInputs = [ poetry-core ]; + + propagatedBuildInputs = [ + orjson python-dateutil requests typer websocket-client + ]; + + checkInputs = [ + pandas + pytestCheckHook + pytest-mock + ]; + + pythonImportsCheck = [ "coinmetrics.api_client" ]; + + passthru = { + optional-dependencies = { + pandas = [ pandas ]; + }; + }; + + meta = with lib; { + homepage = "https://coinmetrics.github.io/api-client-python/site/index.html"; + description = "Coin Metrics API v4 client library (Python)"; + license = licenses.mit; + maintainers = with maintainers; [ centromere ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7b0cb2a9068b..5cedebec3232 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1947,6 +1947,8 @@ in { cogapp = callPackage ../development/python-modules/cogapp { }; + coinmetrics-api-client = callPackage ../development/python-modules/coinmetrics-api-client { }; + ColanderAlchemy = callPackage ../development/python-modules/colanderalchemy { }; colander = callPackage ../development/python-modules/colander { };