Skip to main content

z4j-django

PyPI version Python License

The Django framework adapter for z4j.

Adds the z4j agent into your Django project as a single INSTALLED_APPS entry. Auto-discovers the engine adapter you have installed (Celery, RQ, Dramatiq, Huey, arq, TaskIQ) and streams every task lifecycle event from your Django workers to z4j. Operator control actions (retry, cancel, bulk retry, purge, restart) flow back the same channel.

Compatibility

  • Django 5.0+ (no upper cap)
  • Python 3.11+

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" to INSTALLED_APPS; the agent starts when Django boots, no decorator on every task
  • Engine auto-discovery, picks up whichever z4j engine adapter is installed alongside (Celery, RQ, Dramatiq, Huey, arq, TaskIQ). Multiple engines in the same project are first-class.
  • Schedule integration, pair with z4j-celerybeat to surface django-celery-beat schedules on the dashboard's Schedules page
  • @z4j_meta decorator, optional per-task annotations (priority="critical", description="...") that the dashboard honors for filtering and SLO display
  • Service-user safe, auto-relocates the local outbound buffer to $TMPDIR/z4j-{uid} when $HOME is unwritable (gunicorn under www-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, z4j URL from Z4J_BRAIN_URL, and the project id from Z4J_PROJECT_ID. Mint the token from the dashboard's Agents page.

Reliability

  • No exception from the agent ever propagates back into Django request handlers, signals, or your worker code.
  • Events buffer locally when z4j is unreachable; your application never blocks on network I/O.
  • Agent reconnects on every transient failure with bounded backoff.

Documentation

Full docs at z4j.dev/frameworks/django/.

License

Apache-2.0, see LICENSE.

Links

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

z4j_django-1.8.0.tar.gz (43.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

z4j_django-1.8.0-py3-none-any.whl (41.7 kB view details)

Uploaded Python 3

File details

Details for the file z4j_django-1.8.0.tar.gz.

File metadata

  • Download URL: z4j_django-1.8.0.tar.gz
  • Upload date:
  • Size: 43.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for z4j_django-1.8.0.tar.gz
Algorithm Hash digest
SHA256 1ee4a00bf7a08729bf6270af7b30b31d6b98e0a8f54c459a5f862367d773fe51
MD5 62c739ae882f5e40b5e204a167aa6a4a
BLAKE2b-256 fec00d975ee43314ab47b1aceaa919ad25d7ad5e0fa6f0fd40cabbe84b1a687b

See more details on using hashes here.

File details

Details for the file z4j_django-1.8.0-py3-none-any.whl.

File metadata

  • Download URL: z4j_django-1.8.0-py3-none-any.whl
  • Upload date:
  • Size: 41.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for z4j_django-1.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a28bc9356ae56536881e01b322b3be9046e0ea7d8ff17089dfbd88b55a09d4ff
MD5 23d91cbfeabe5b5eb7b0867dace306da
BLAKE2b-256 63d96835af1d460a2f3e980b0ca2cd5361bb760ea7b799785e0ecefda84ad641

See more details on using hashes here.

Release history Release notifications | RSS feed

1.10.0

2 files

1.9.1

2 files

1.9.0

2 files

This release

1.8.0 This release

2 files

1.7.0

2 files

1.6.9

2 files

1.6.8

2 files

1.6.7

2 files

1.6.0

2 files

1.5.0

2 files

1.4.0

2 files

1.3.0

2 files

1.2.0

2 files

1.1.2

2 files

1.1.0

2 files

1.0.7

2 files

1.0.6

1 file

1.0.5

2 files

1.0.4

2 files

1.0.1

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page