summary refs log tree commit diff
path: root/pkgs/development/python-modules/python-binance/default.nix
blob: f5cd9b29f520e48a2bd632c6793e07b9ea55bdcc (plain) (blame)
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
{ lib
, aiohttp
, buildPythonPackage
, dateparser
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, requests
, requests-mock
, six
, ujson
, websockets
}:

buildPythonPackage rec {
  pname = "python-binance";
  version = "1.0.16";
  format = "setuptools";

  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "sammchardy";
    repo = pname;
    rev = "refs/tags/v${version}";
    hash = "sha256-2v3qeykjQR/CUOC6F0Xomm49Q+wrYJS8vmL3+u6ew0M=";
  };

  propagatedBuildInputs = [
    aiohttp
    dateparser
    requests
    six
    ujson
    websockets
  ];

  checkInputs = [
    pytestCheckHook
    requests-mock
  ];

  disabledTestPaths = [
    # Tests require network access
    "tests/test_api_request.py"
    "tests/test_historical_klines.py"
  ];

  pythonImportsCheck = [
    "binance"
  ];

  meta = with lib; {
    description = "Binance Exchange API python implementation for automated trading";
    homepage = "https://github.com/sammchardy/python-binance";
    license = licenses.mit;
    maintainers = with maintainers; [ bhipple ];
  };
}