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