From bd64c347873087fa57f993e7265a22484b0e7839 Mon Sep 17 00:00:00 2001 From: Marc 'risson' Schmitt Date: Thu, 12 Jun 2025 10:36:21 +0200 Subject: [PATCH] init django-dramatiq-postgres package Signed-off-by: Marc 'risson' Schmitt --- Dockerfile | 2 + packages/django-dramatiq-postgres/README.md | 0 .../django_dramatiq_postgres/__init__.py | 0 .../django-dramatiq-postgres/pyproject.toml | 50 +++++++++++++++++++ pyproject.toml | 7 ++- uv.lock | 29 +++++++++++ 6 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 packages/django-dramatiq-postgres/README.md create mode 100644 packages/django-dramatiq-postgres/django_dramatiq_postgres/__init__.py create mode 100644 packages/django-dramatiq-postgres/pyproject.toml diff --git a/Dockerfile b/Dockerfile index dfebd9e4c1..bc2f450a75 100644 --- a/Dockerfile +++ b/Dockerfile @@ -122,6 +122,7 @@ ENV UV_NO_BINARY_PACKAGE="cryptography lxml python-kadmin-rs xmlsec" RUN --mount=type=bind,target=pyproject.toml,src=pyproject.toml \ --mount=type=bind,target=uv.lock,src=uv.lock \ + --mount=type=bind,target=packages,src=packages \ --mount=type=cache,target=/root/.cache/uv \ uv sync --frozen --no-install-project --no-dev @@ -157,6 +158,7 @@ RUN apt-get update && \ chown authentik:authentik /certs /media /authentik/.ssh /ak-root COPY ./authentik/ /authentik +COPY ./packages/ /packages COPY ./pyproject.toml / COPY ./uv.lock / COPY ./schemas /schemas diff --git a/packages/django-dramatiq-postgres/README.md b/packages/django-dramatiq-postgres/README.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/django-dramatiq-postgres/django_dramatiq_postgres/__init__.py b/packages/django-dramatiq-postgres/django_dramatiq_postgres/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/django-dramatiq-postgres/pyproject.toml b/packages/django-dramatiq-postgres/pyproject.toml new file mode 100644 index 0000000000..8e54b78d9d --- /dev/null +++ b/packages/django-dramatiq-postgres/pyproject.toml @@ -0,0 +1,50 @@ +[project] +name = "django-dramatiq-postgres" +version = "0.1.0" +description = "Django and DramatiQ integration with postgres-specific features" +requires-python = ">=3.9,<3.14" +readme = "README.md" +license = "MIT" +authors = [{ name = "Authentik Security Inc.", email = "hello@goauthentik.io" }] +keywords = ["django", "dramatiq", "postgres"] + +classifiers = [ + "Development Status :: 3 - Alpha", + "Environment :: Web Environment", + "Framework :: Django", + "Framework :: Django :: 4.2", + "Framework :: Django :: 5.0", + "Framework :: Django :: 5.1", + "Framework :: Django :: 5.2", + "Intended Audience :: Developers", + "Operating System :: MacOS", + "Operating System :: POSIX", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python", + "Topic :: Software Development :: Libraries :: Python Modules", +] + +dependencies = [ + "cron-converter >=1,<2", + "django >=4.2,<6.0", + "django-pgtrigger >=4,<5", + "dramatiq >=1.17,<1.18", + "tenacity >=9,<10", +] + +[project.urls] +Homepage = "https://github.com/goauthentik/authentik/tree/main/packages/django-dramatiq-postgres" +Documentation = "https://github.com/goauthentik/authentik/tree/main/packages/django-dramatiq-postgres" +Repository = "https://github.com/goauthentik/authentik/tree/main/packages/django-dramatiq-postgres" + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.setuptools.packages] +find = {} diff --git a/pyproject.toml b/pyproject.toml index 54497524a6..ad978685d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,6 +16,7 @@ dependencies = [ "django==5.1.11", "django-countries==7.6.1", "django-cte==1.3.3", + "django-dramatiq-postgres", "django-filter==25.1", "django-guardian==3.0.0", "django-model-utils==5.0.0", @@ -115,8 +116,12 @@ no-binary-package = [ ] [tool.uv.sources] -opencontainers = { git = "https://github.com/vsoch/oci-python", rev = "ceb4fcc090851717a3069d78e85ceb1e86c2740c" } +django-dramatiq-postgres = { workspace = true } djangorestframework = { git = "https://github.com/goauthentik/django-rest-framework", rev = "896722bab969fabc74a08b827da59409cf9f1a4e" } +opencontainers = { git = "https://github.com/vsoch/oci-python", rev = "ceb4fcc090851717a3069d78e85ceb1e86c2740c" } + +[tool.uv.workspace] +members = ["packages/django-dramatiq-postgres"] [project.scripts] ak = "lifecycle.ak:main" diff --git a/uv.lock b/uv.lock index c6be3d3d01..a7b5adc1f3 100644 --- a/uv.lock +++ b/uv.lock @@ -2,6 +2,12 @@ version = 1 revision = 2 requires-python = "==3.13.*" +[manifest] +members = [ + "authentik", + "django-dramatiq-postgres", +] + [[package]] name = "aiohappyeyeballs" version = "2.6.1" @@ -167,6 +173,7 @@ dependencies = [ { name = "django" }, { name = "django-countries" }, { name = "django-cte" }, + { name = "django-dramatiq-postgres" }, { name = "django-filter" }, { name = "django-guardian" }, { name = "django-model-utils" }, @@ -266,6 +273,7 @@ requires-dist = [ { name = "django", specifier = "==5.1.11" }, { name = "django-countries", specifier = "==7.6.1" }, { name = "django-cte", specifier = "==1.3.3" }, + { name = "django-dramatiq-postgres", editable = "packages/django-dramatiq-postgres" }, { name = "django-filter", specifier = "==25.1" }, { name = "django-guardian", specifier = "==3.0.0" }, { name = "django-model-utils", specifier = "==5.0.0" }, @@ -939,6 +947,27 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/b3/02/a9d12e8c1cb767b2541bf7d759fbe713f84238f1c2bd22ed2ef3bed14606/django_cte-1.3.3-py2.py3-none-any.whl", hash = "sha256:85bbc3efb30c2f8c9ae3080ca6f0b9570e43d2cb4b6be10846c8ef9f046873fa", size = 11989, upload-time = "2024-06-07T12:51:04.827Z" }, ] +[[package]] +name = "django-dramatiq-postgres" +version = "0.1.0" +source = { editable = "packages/django-dramatiq-postgres" } +dependencies = [ + { name = "cron-converter" }, + { name = "django" }, + { name = "django-pgtrigger" }, + { name = "dramatiq" }, + { name = "tenacity" }, +] + +[package.metadata] +requires-dist = [ + { name = "cron-converter", specifier = ">=1,<2" }, + { name = "django", specifier = ">=4.2,<6.0" }, + { name = "django-pgtrigger", specifier = ">=4,<5" }, + { name = "dramatiq", specifier = ">=1.17,<1.18" }, + { name = "tenacity", specifier = ">=9,<10" }, +] + [[package]] name = "django-filter" version = "25.1"