1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pycryptodome, 6 pythonOlder, 7 requests, 8 websocket-client, 9 # dependencies for tests 10 pytest-cov, 11 pytest, 12 sure, 13 responses, 14 pytestCheckHook, 15}: 16 17buildPythonPackage rec { 18 pname = "binance-connector"; 19 version = "3.7.0"; 20 format = "setuptools"; 21 22 disabled = pythonOlder "3.7"; 23 24 src = fetchFromGitHub { 25 owner = "binance"; 26 repo = "${pname}-python"; 27 rev = "refs/tags/v${version}"; 28 hash = "sha256-hmn8WKr+krzOzHNJ/aynXAbf+rHxDfyKDgycdQQU3xk="; 29 }; 30 31 propagatedBuildInputs = [ 32 requests 33 pycryptodome 34 websocket-client 35 ]; 36 37 nativeCheckInputs = [ 38 pytest-cov 39 pytest 40 sure 41 responses 42 pytestCheckHook 43 ]; 44 45 # pytestCheckHook attempts to run examples directory, which requires 46 # network access 47 disabledTestPaths = [ "examples/" ]; 48 49 pythonImportsCheck = [ 50 "binance.spot" 51 "binance.websocket" 52 ]; 53 54 meta = with lib; { 55 description = "Simple connector to Binance Public API"; 56 homepage = "https://github.com/binance/binance-connector-python"; 57 license = licenses.mit; 58 maintainers = with maintainers; [ trishtzy ]; 59 }; 60}