summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/coinbase-advanced-py/default.nix
blob: 3d46ac84cff941ce32ed940bd2e1fb9153081471 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  pythonRelaxDepsHook,
  requests,
  cryptography,
  pyjwt,
  websockets,
  backoff,
  pytestCheckHook,
  requests-mock,
}:

buildPythonPackage rec {
  pname = "coinbase-advanced-py";
  version = "1.8.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "coinbase";
    repo = "coinbase-advanced-py";
    tag = "v${version}";
    hash = "sha256-1XJ4QnFJVSbSCfkB16+UTARXqhlsy36Db3S6ju6nJUY=";
  };

  build-system = [
    setuptools
  ];

  pythonRelaxDeps = [
    "websockets"
  ];

  dependencies = [
    requests
    cryptography
    pyjwt
    websockets
    backoff
  ];

  nativeCheckInputs = [
    pytestCheckHook
    requests-mock
  ];

  pythonImportsCheck = [
    "coinbase"
    "coinbase.rest"
    "coinbase.websocket"
  ];

  disabledTestPaths = [
    # WebSocket tests fail due to API changes in websockets >= 14.0
    "tests/websocket/"
  ];

  meta = {
    description = "Coinbase Advanced API Python SDK";
    homepage = "https://github.com/coinbase/coinbase-advanced-py";
    changelog = "https://github.com/coinbase/coinbase-advanced-py/releases/tag/v${version}";
    license = lib.licenses.asl20;
    maintainers = [ lib.maintainers.jamiemagee ];
  };
}