1{ 2 lib, 3 aiohttp, 4 buildPythonPackage, 5 dateparser, 6 fetchFromGitHub, 7 fetchpatch, 8 pycryptodome, 9 pytestCheckHook, 10 pythonOlder, 11 requests, 12 requests-mock, 13 six, 14 ujson, 15 websockets, 16}: 17 18buildPythonPackage rec { 19 pname = "python-binance"; 20 version = "1.0.17"; 21 format = "setuptools"; 22 23 disabled = pythonOlder "3.6"; 24 25 src = fetchFromGitHub { 26 owner = "sammchardy"; 27 repo = pname; 28 rev = "refs/tags/v${version}"; 29 hash = "sha256-e88INUEkjOSVOD0KSs9LmstuQ7dQZdJk8K6VqFEusww="; 30 }; 31 32 patches = [ 33 (fetchpatch { 34 name = "fix-unable-to-determine-version-error.patch"; 35 url = "https://github.com/sammchardy/python-binance/commit/1b9dd4853cafccf6cdacc13bb64a18632a79a6f1.patch"; 36 hash = "sha256-6KRHm2cZRcdD6qMdRAwlea4qLZ1/1YFzZAQ7Ph4XMCs="; 37 }) 38 ]; 39 40 propagatedBuildInputs = [ 41 aiohttp 42 dateparser 43 requests 44 pycryptodome 45 six 46 ujson 47 websockets 48 ]; 49 50 nativeCheckInputs = [ 51 pytestCheckHook 52 requests-mock 53 ]; 54 55 disabledTestPaths = [ 56 # Tests require network access 57 "tests/test_api_request.py" 58 "tests/test_historical_klines.py" 59 ]; 60 61 pythonImportsCheck = [ "binance" ]; 62 63 meta = with lib; { 64 description = "Binance Exchange API python implementation for automated trading"; 65 homepage = "https://github.com/sammchardy/python-binance"; 66 license = licenses.mit; 67 maintainers = with maintainers; [ bhipple ]; 68 }; 69}