{ lib, buildPythonPackage, fetchPypi, orjson, pandas, poetry-core, polars, pytest-mock, pytestCheckHook, python-dateutil, pythonOlder, pyyaml, requests, tqdm, typer, websocket-client, }: buildPythonPackage rec { pname = "coinmetrics-api-client"; version = "2025.9.17.17"; pyproject = true; disabled = pythonOlder "3.9"; __darwinAllowLocalNetworking = true; src = fetchPypi { inherit version; pname = "coinmetrics_api_client"; hash = "sha256-Quupd3I5OM4VtTblHup0z0lX5fSy6h9U1dnbjocAziM="; }; pythonRelaxDeps = [ "typer" ]; build-system = [ poetry-core ]; dependencies = [ orjson python-dateutil pyyaml requests typer tqdm websocket-client ]; optional-dependencies = { pandas = [ pandas ]; polars = [ polars ]; }; nativeCheckInputs = [ pytestCheckHook pytest-mock ] ++ lib.flatten (builtins.attrValues optional-dependencies); pythonImportsCheck = [ "coinmetrics.api_client" ]; meta = with lib; { description = "Coin Metrics API v4 client library"; homepage = "https://coinmetrics.github.io/api-client-python/site/index.html"; license = licenses.mit; maintainers = with maintainers; [ centromere ]; mainProgram = "coinmetrics"; }; }