Skip to content

Adapter axes

z4j adapters are organized along three independent axes. They compose freely: any framework × any engine × any scheduler is supported.

A framework adapter knows how your process boots and how to read its settings.

Package Covers
z4j-django Django 5.2.17+ (<6) on Python 3.11; Django 6.0.8+ uncapped on Python 3.12+. Reads settings.Z4J. Uses app-config for agent lifecycle.
z4j-flask Flask 2.x / 3.x. Z4J(app, config) factory-style init.
z4j-fastapi FastAPI 0.109.1+. Z4JAgent context manager in the lifespan.
z4j-bare Any Python 3.11+ process. Direct Agent(...) usage. Foundation of all others.

All framework adapters delegate the actual agent runtime to z4j-bare.

An engine adapter knows how your queue enqueues, executes, and fails tasks.

Package Engine Native retry Native cancel Bulk retry Schedule support
z4j-celery Celery 5.2.2+ celery-beat
z4j-rq RQ 1.10.1+ rq-scheduler
z4j-dramatiq Dramatiq 1.14+ complete replacements no no APScheduler
z4j-huey Huey 2.4+ complete replacements no no huey-periodic
z4j-arq arq 0.26+ no no arq cron
z4j-taskiq taskiq 0.11+ no no no taskiqscheduler

The brain stores redacted inputs and does not rebuild executable task payloads. "Complete replacements" means the operator supplies both args and kwargs.

A scheduler adapter inventories periodic tasks and exposes only the mutations its schedule source can honor.

Package Scheduler Read Write Notes
z4j-celerybeat celery-beat ✓ (if django-celery-beat) Filesystem beat is read-only
z4j-rqscheduler rq-scheduler disable / delete / trigger No create, update, or enable
z4j-apscheduler APScheduler 3 Works standalone or with Dramatiq
z4j-hueyperiodic Huey periodic tasks read-only Decorators are code; UI can't add new ones
z4j-arqcron arq cron jobs read-only Same limitation, decorators in source
z4j-taskiqscheduler taskiq-scheduler read-only Standard label source is decorator-defined

You install one framework + one or more engines + zero or more schedulers:

Terminal window
# Django + Celery + beat
pip install z4j-django z4j-celery z4j-celerybeat
# Flask + RQ + scheduler + Dramatiq + APScheduler (unusual but supported)
pip install z4j-flask z4j-rq z4j-rqscheduler z4j-dramatiq z4j-apscheduler

The framework adapter discovers the installed engines and schedulers via entry points; no wiring code.

The adapter interface is internal and not currently documented for third-party authors. If you need a custom engine adapter, the existing packages (z4j-celery, z4j-rq, etc.) are the working reference implementations.

See the per-engine pages for the exact adapter surface of each.