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