Skip to main content

z4j Django framework adapter (Apache 2.0)

Project description

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.

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_AGENT_TOKEN, z4j URL from Z4J_BRAIN_URL, and the project slug from Z4J_PROJECT. 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

Project details


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.6.0.tar.gz (42.0 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.6.0-py3-none-any.whl (39.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: z4j_django-1.6.0.tar.gz
  • Upload date:
  • Size: 42.0 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.6.0.tar.gz
Algorithm Hash digest
SHA256 59dbb11df1177d122dacdabd6be8892deb88bacfc021b4eb3461e92492e5b80e
MD5 9b67d5741cdd6f0096351ba84a4953e2
BLAKE2b-256 6ec14c780c05269b748277b4406ea201939c7e5dcedf71dd1a79278a064f1008

See more details on using hashes here.

File details

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

File metadata

  • Download URL: z4j_django-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 39.9 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.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 51aa318895f5e10c876e05de2aa057faa7a9aae4bb2f9605d5d92f1ba3771ac9
MD5 2c0e0c7a1976c2f0a20586fedd877a4a
BLAKE2b-256 4f4875efbbd1bb182ae11120dc79565f17f4cc55f3b046fe2eb2106449ddb8a9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page