1{ lib
2, buildPythonPackage
3, fetchPypi
4, nix-update-script
5, orjson
6, pandas
7, poetry-core
8, pytest-mock
9, pytestCheckHook
10, python-dateutil
11, pythonOlder
12, pythonRelaxDepsHook
13, requests
14, tqdm
15, typer
16, websocket-client
17}:
18
19buildPythonPackage rec {
20 pname = "coinmetrics-api-client";
21 version = "2023.11.13.14";
22 format = "pyproject";
23
24 disabled = pythonOlder "3.9";
25
26 __darwinAllowLocalNetworking = true;
27
28 src = fetchPypi {
29 inherit version;
30 pname = "coinmetrics_api_client";
31 hash = "sha256-+hX1msvm4hRl3luhMWgXcmpV2DmGI1oCknSP4QEWtxM=";
32 };
33
34 pythonRelaxDeps = [
35 "typer"
36 ];
37
38 nativeBuildInputs = [
39 poetry-core
40 pythonRelaxDepsHook
41 ];
42
43 propagatedBuildInputs = [
44 orjson
45 python-dateutil
46 requests
47 typer
48 tqdm
49 websocket-client
50 ];
51
52 nativeCheckInputs = [
53 pytestCheckHook
54 pytest-mock
55 ] ++ passthru.optional-dependencies.pandas;
56
57 pythonImportsCheck = [
58 "coinmetrics.api_client"
59 ];
60
61 passthru = {
62 optional-dependencies = {
63 pandas = [
64 pandas
65 ];
66 };
67 updateScript = nix-update-script { };
68 };
69
70 meta = with lib; {
71 description = "Coin Metrics API v4 client library";
72 homepage = "https://coinmetrics.github.io/api-client-python/site/index.html";
73 license = licenses.mit;
74 maintainers = with maintainers; [ centromere ];
75 };
76}