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 4.2+ with no adapter upper cap
- Python 3.11+; choose a Python/Django combination supported by that Django release
Existing Django 4.2 and 5.2 applications can install the adapter without moving
to Django 6. Current-framework tests also cover Django 6.1.1. django-celery-beat
declares its own Django<6.1 constraint, which applies only where it is
installed (for example through z4j-celerybeat[django]); this adapter's
celery and all extras do not install django-celery-beat.
This range describes integration API compatibility. Use supported Django release lines and current security patches for production; legacy compatibility does not certify an older host application as secure. Z4J's own audited deployment locks are maintained separately from the adapter's public requirements.
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://docs.z4j.com/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. A full engine queue loses an event (the Celery, RQ and Dramatiq adapters evict the oldest queued event; the Huey, arq and TaskIQ adapters drop the new one) and buffer pressure evicts oldest rows; both losses are logged.
- Agent reconnects on every transient failure with bounded backoff.
Documentation
Full docs at docs.z4j.com/frameworks/django/.
License
Apache-2.0, see LICENSE.
Links
- Homepage: https://z4j.com
- Documentation: https://docs.z4j.com
- 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)
Metadata
Release files for z4j-django 1.13.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 | Provenance | Actions |
|---|---|---|---|---|
| z4j_django-1.13.0.tar.gz | 44.0 kB | Without provenance | Details for z4j_django-1.13.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| z4j_django-1.13.0-py3-none-any.whl | Python 3 | none | any | Details for z4j_django-1.13.0-py3-none-any.whl |
Total release size: 85.5 kB
Release files / z4j_django-1.13.0.tar.gz
| Download URL | z4j_django-1.13.0.tar.gz |
|---|---|
| Size | 44.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
168eef095e7fea5100cc371f15af1010fe75464aa2fb66805ad5b3e580b9b6f9
|
|
BLAKE2b-256 checksum How to use checksums |
4d17f8d74a410701d855575e8b456dddd788f5a799d5e49152ffed690e266578
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / z4j_django-1.13.0-py3-none-any.whl
| Download URL | z4j_django-1.13.0-py3-none-any.whl |
|---|---|
| Size | 41.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8293105bb19e53ca1d30f99f9ee4a21b8add78562dd7c080dcf3f0c696b9ff61
|
|
BLAKE2b-256 checksum How to use checksums |
684934963e01f7da2bdae6142d7b137769fa6a459b1b61ae2edbf096c9ee85ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for z4j-django 1.13.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.