z4j-django
The Django framework adapter for z4j.
Adds the z4j agent to a Django process as a single INSTALLED_APPS
entry. The Django integration locates a configured Celery app when
z4j-celery is installed, and z4j-celery separately bootstraps the agent in
Celery worker processes. Installing an RQ, Dramatiq, Huey, arq, or TaskIQ
adapter does not by itself activate that engine in Django; wire those worker
processes through the engine-specific or framework-free integration.
Compatibility
- Django 5.2.17 or newer (below Django 6) on Python 3.11
- Django 6.0.8 or newer with no adapter cap on Python 3.12+
- Python 3.11+
A standalone Python 3.12+ install can resolve Django 6.1. The Celery and
all-extras lanes currently resolve Django 6.0.8 because
django-celery-beat still declares Django<6.1; that is an upstream
coexistence constraint, not a stale security pin.
Pair with an engine adapter (z4j-celery, z4j-rq, z4j-dramatiq, z4j-huey, z4j-arq, z4j-taskiq); each engine adapter carries its own upstream floor.
Full per-adapter matrix at https://z4j.dev/reference/compatibility/.
What it ships
- One-line install, add
"z4j_django"toINSTALLED_APPS; the agent starts when Django boots, no decorator on every task - Celery discovery and worker bootstrap, locates the configured Celery app in Django processes and registers a separate engine-aware runtime inside Celery workers
- Schedule integration, pair with
z4j-celerybeatto surface django-celery-beat schedules on the dashboard's Schedules page - Per-task metadata from supporting engine adapters;
z4j-celery,z4j-rq, andz4j-dramatiqexpose@z4j_metarather than this framework package defining one - Service-user safe, auto-relocates the local outbound buffer
to
$TMPDIR/z4j-{uid}when$HOMEis unwritable (gunicorn underwww-data,nginx, etc.)
Install
pip install z4j-django z4j-celery z4j-celerybeat
Then in settings.py:
INSTALLED_APPS = [
# ...
"django_celery_beat", # if you use celery-beat
"z4j_django",
]
The agent reads its bearer token from Z4J_TOKEN, mandatory envelope-signing
secret from Z4J_HMAC_SECRET, z4j URL from Z4J_BRAIN_URL, and project id from
Z4J_PROJECT_ID. The Agents page shows the token and HMAC secret when the
agent is minted; retain both values.
Reliability
- Agent startup and delivery failures are logged and isolated from Django request handlers, signals, and worker code; capture hooks make no brain network request inline.
- Engine event queues and the SQLite outbound buffer are bounded. Queue overflow drops new events and buffer pressure evicts oldest rows; both losses are logged.
- Agent reconnects on every transient failure with bounded backoff.
Documentation
Full docs at z4j.dev/frameworks/django/.
License
Apache-2.0, see LICENSE.
Links
- Homepage: https://z4j.com
- Documentation: https://z4j.dev
- PyPI: https://pypi.org/project/z4j-django/
- Issues: https://github.com/z4jdev/z4j-django/issues
- Changelog: CHANGELOG.md
- Security: security@z4j.com (see SECURITY.md)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file z4j_django-1.9.0.tar.gz.
File metadata
- Download URL: z4j_django-1.9.0.tar.gz
- Upload date:
- Size: 43.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02cad5fd84f7982c97c6c470e17d1dc1d87f7e7f935afdb9774f7c2e842769b9
|
|
| MD5 |
634697d9da9c0924e0b7561b800b7ea0
|
|
| BLAKE2b-256 |
d44982e3cf0341fad2e14ef97f0e7511bbc7c2f8209616b11819870226fd0675
|
File details
Details for the file z4j_django-1.9.0-py3-none-any.whl.
File metadata
- Download URL: z4j_django-1.9.0-py3-none-any.whl
- Upload date:
- Size: 41.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b96ca4c51bde07ac627d51d488b79620aa3c759c60cf05499978e2937086a841
|
|
| MD5 |
a4ac97739867a7a990a987d6347afdc1
|
|
| BLAKE2b-256 |
bf38c2b233c740bd36bf191b1009ff2f2c973c74cac2bbc8f29821dea8ddbc69
|