1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, sqlalchemy 5, aiocontextvars 6, aiopg 7, pythonOlder 8, pytestCheckHook 9, pymysql 10, asyncpg 11, aiomysql 12, aiosqlite 13}: 14 15buildPythonPackage rec { 16 pname = "databases"; 17 version = "0.5.3"; 18 19 disabled = pythonOlder "3.6"; 20 21 src = fetchFromGitHub { 22 owner = "encode"; 23 repo = pname; 24 rev = version; 25 sha256 = "sha256-67ykx7HKGgRvJ+GRVEI/e2+x51kfHHFjh/iI4tY+6aE="; 26 }; 27 28 propagatedBuildInputs = [ 29 aiopg 30 aiomysql 31 aiosqlite 32 asyncpg 33 pymysql 34 sqlalchemy 35 ] ++ lib.optionals (pythonOlder "3.7") [ 36 aiocontextvars 37 ]; 38 39 checkInputs = [ 40 pytestCheckHook 41 ]; 42 43 disabledTestPaths = [ 44 # circular dependency on starlette 45 "tests/test_integration.py" 46 # TEST_DATABASE_URLS is not set. 47 "tests/test_databases.py" 48 "tests/test_connection_options.py" 49 ]; 50 51 pythonImportsCheck = [ 52 "databases" 53 ]; 54 55 meta = with lib; { 56 description = "Async database support for Python"; 57 homepage = "https://github.com/encode/databases"; 58 license = licenses.bsd3; 59 maintainers = with maintainers; [ costrouc ]; 60 }; 61}