entirius-django-agreements
A Django module for consents and legal agreements in Entirius, the open-source modular ecommerce platform. It versions agreement texts, records every consent and objection in an append-only audit trail, and freezes the text a customer accepted with each order. The CMS manages agreements over an admin API; the storefront uses a public API.
What it does
- Defines agreements per sales channel and keeps immutable, numbered versions of their text.
- Records consents and withdrawals per email address as an append-only audit log.
- Stores a snapshot of the accepted agreement texts with every order.
- Handles newsletter signup with double opt-in confirmation links.
- Versions legal clauses per channel, legal basis and language, and records objections.
- Exports and pseudonymises personal data for GDPR requests.
Installation
uv add entirius-django-agreements
pip install entirius-django-agreements
INSTALLED_APPS = [
...
"django_utils",
"django_regional",
"django_agreements",
]
# urls.py
urlpatterns = [
path("", include("django_agreements.urls")),
]
No setting is required: every setting has a default. Reference: https://github.com/entirius/entirius-django-agreements/blob/develop/docs/configuration.md
The newsletter subscribe endpoint takes a key in the X-API-KEY header. Where django_access is installed the key
is an access token with the scope agreements.subscribe:
python manage.py access_token create --application storefront --create-application --scope agreements.subscribe --channel default
Without django_access, the key is the value of the AGREEMENTS_API_KEY setting.
Quick start
from django_agreements.services.consent_service import get_consent_status, is_consented
is_consented("customer@example.com", "marketing-email") # latest record for one agreement
get_consent_status("customer@example.com") # every agreement slug -> granted
Channels are copied from the product module when it is installed:
python manage.py sync_agreement_channels
Requirements
- Python 3.11 or newer, Django 5.0 or newer.
- Entirius packages pulled in:
entirius-django-utils,entirius-django-regional,entirius-py-process-logger.
Documentation
- Module docs: https://github.com/entirius/entirius-django-agreements/tree/develop/docs
- Entirius documentation: https://docs.entirius.com/
- Changelog: https://github.com/entirius/entirius-django-agreements/blob/develop/CHANGELOG.md
Part of Entirius
This module runs inside the Entirius backend service (Volkanos); the leads module builds on its legal bases and consents.
- Backend service: https://github.com/entirius/entirius-service-volkanos
- Docker harness: https://github.com/entirius/entirius-zeno
- Sibling modules: https://github.com/entirius/entirius-django-regional, https://github.com/entirius/entirius-django-leads, https://github.com/entirius/entirius-django-access
Development
make install # sync dependencies (uv)
make check # lint + format check (ruff)
make test # test suite (pytest + pytest-django, needs PostgreSQL via DATABASE_URL)
Development and agent instructions: https://github.com/entirius/entirius-django-agreements/blob/develop/AGENTS.md
License
Mozilla Public License 2.0 (MPL-2.0) — see https://github.com/entirius/entirius-django-agreements/blob/develop/LICENSE.
Metadata
Release files for entirius-django-agreements 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| entirius_django_agreements-3.0.0.tar.gz | 188.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| entirius_django_agreements-3.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 313.4 kB
Release files / entirius_django_agreements-3.0.0.tar.gz
| Download URL | entirius_django_agreements-3.0.0.tar.gz |
|---|---|
| Size | 188.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9db618294033826219c45aa76d32a155c8d9bfac6c3b607995caa52eb7e6037c
|
|
BLAKE2b-256 checksum How to use checksums |
6752fd4cc22d7a35a0446333a7cf99cf2bae96d8088e05bec9fee1902ceca6f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / entirius_django_agreements-3.0.0-py3-none-any.whl
| Download URL | entirius_django_agreements-3.0.0-py3-none-any.whl |
|---|---|
| Size | 125.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
02a0e836ad8356c0c72f3858ea851d8e949094044bff25a0325f11adbaac4c11
|
|
BLAKE2b-256 checksum How to use checksums |
c041f71e7c46ef021aebc0aca13769983fb36425e0ce7c37679d3b36bee4847a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|