aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2024-07-28 05:14:36 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2024-07-28 06:13:39 +0000
commitd69eb732c8ce28d9e4134ee5a53a25ae0a24d16f (patch)
tree5626e1985f9c704653b5804b299c8fe5728dcad7
parent3d1214d4a57249a7fa9699d4a2ca49b8ae3bce10 (diff)
www/py-starlette-context: New port: Starlette: store and access the context data of a request
-rw-r--r--www/Makefile1
-rw-r--r--www/py-starlette-context/Makefile33
-rw-r--r--www/py-starlette-context/distinfo3
-rw-r--r--www/py-starlette-context/pkg-descr3
4 files changed, 40 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile
index f6cc8124bfe1..5a8816f94ae3 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -1822,6 +1822,7 @@
SUBDIR += py-spyne
SUBDIR += py-sseclient
SUBDIR += py-starlette
+ SUBDIR += py-starlette-context
SUBDIR += py-strawberry-graphql-django
SUBDIR += py-streamlit
SUBDIR += py-swapper
diff --git a/www/py-starlette-context/Makefile b/www/py-starlette-context/Makefile
new file mode 100644
index 000000000000..2e050bc9b3cd
--- /dev/null
+++ b/www/py-starlette-context/Makefile
@@ -0,0 +1,33 @@
+PORTNAME= starlette-context
+DISTVERSIONPREFIX= v
+DISTVERSION= 0.3.6
+CATEGORIES= www python
+#MASTER_SITES= PYPI # no tests
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Starlette: store and access the context data of a request
+WWW= https://starlette-context.readthedocs.io/en/latest/
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}poetry-core>=1.0.0:devel/py-poetry-core@${PY_FLAVOR}
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}starlette>0:www/py-starlette@${PY_FLAVOR}
+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}codecov>=2.1.12:devel/py-codecov@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}coverage>=7.0.2:devel/py-coverage@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}httpx>=0.23.2:www/py-httpx@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pytest-asyncio>=0.20.3:devel/py-pytest-asyncio@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pytest-cov>=4.0.0:devel/py-pytest-cov@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pytest-sugar>=0.9.6:devel/py-pytest-sugar@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pytest-xdist>=3.1.0:devel/py-pytest-xdist@${PY_FLAVOR}
+
+USES= python
+USE_PYTHON= pep517 autoplist pytest
+
+USE_GITHUB= yes
+GH_ACCOUNT= tomwojcik
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/www/py-starlette-context/distinfo b/www/py-starlette-context/distinfo
new file mode 100644
index 000000000000..0a6f0e0cbdf8
--- /dev/null
+++ b/www/py-starlette-context/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1722143053
+SHA256 (tomwojcik-starlette-context-v0.3.6_GH0.tar.gz) = a71af70fab9284b0db6bddfe811d00d145ef4c42264d0cc98869c9fecc7a49e4
+SIZE (tomwojcik-starlette-context-v0.3.6_GH0.tar.gz) = 55771
diff --git a/www/py-starlette-context/pkg-descr b/www/py-starlette-context/pkg-descr
new file mode 100644
index 000000000000..9ad6dfdb2536
--- /dev/null
+++ b/www/py-starlette-context/pkg-descr
@@ -0,0 +1,3 @@
+starlette-context is a middleware for Starlette that allows you to store and
+access the context data of a request. Can be used with logging so logs
+automatically use request headers such as x-request-id or x-correlation-id.