python312Packages.starlette-context: init at 0.3.6

Middleware for Starlette that allows you to store and access the
context data of a request

https://github.com/tomwojcik/starlette-context
This commit is contained in:
Fabian Affolter 2024-03-28 14:14:27 +01:00
parent e21763ec29
commit 84193256b5
2 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,51 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, httpx
, poetry-core
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, starlette
}:
buildPythonPackage rec {
pname = "starlette-context";
version = "0.3.6";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "tomwojcik";
repo = "starlette-context";
rev = "refs/tags/v${version}";
hash = "sha256-ZKwE2M86clYKdptd0o/j8VYUOj/Y/72uUnpxFbJ65vw=";
};
build-system = [
poetry-core
];
dependencies = [
starlette
];
nativeCheckInputs = [
httpx
pytest-asyncio
pytestCheckHook
];
pythonImportsCheck = [
"starlette_context"
];
meta = with lib; {
description = "Middleware for Starlette that allows you to store and access the context data of a request";
homepage = "https://github.com/tomwojcik/starlette-context";
changelog = "https://github.com/tomwojcik/starlette-context/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -14234,6 +14234,8 @@ self: super: with self; {
starlette = callPackage ../development/python-modules/starlette { };
starlette-context = callPackage ../development/python-modules/starlette-context { };
starlette-wtf = callPackage ../development/python-modules/starlette-wtf { };
starkbank-ecdsa = callPackage ../development/python-modules/starkbank-ecdsa { };