1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 httpx, 6 poetry-core, 7 pytest-asyncio, 8 pytestCheckHook, 9 pythonOlder, 10 starlette, 11}: 12 13buildPythonPackage rec { 14 pname = "starlette-context"; 15 version = "0.4.0"; 16 pyproject = true; 17 18 disabled = pythonOlder "3.8"; 19 20 src = fetchFromGitHub { 21 owner = "tomwojcik"; 22 repo = "starlette-context"; 23 tag = "v${version}"; 24 hash = "sha256-PzVZ458TdBLdbFJDN+X8hVU5zsRxcesihoDB+jRaKAg="; 25 }; 26 27 build-system = [ poetry-core ]; 28 29 dependencies = [ starlette ]; 30 31 nativeCheckInputs = [ 32 httpx 33 pytest-asyncio 34 pytestCheckHook 35 ]; 36 37 pythonImportsCheck = [ "starlette_context" ]; 38 39 meta = with lib; { 40 description = "Middleware for Starlette that allows you to store and access the context data of a request"; 41 homepage = "https://github.com/tomwojcik/starlette-context"; 42 changelog = "https://github.com/tomwojcik/starlette-context/releases/tag/v${version}"; 43 license = licenses.mit; 44 maintainers = with maintainers; [ fab ]; 45 }; 46}