Adapter axes
z4j adapters are organized along three independent axes. They compose freely: any framework × any engine × any scheduler is supported.
Axis 1: Framework
Section titled “Axis 1: Framework”A framework adapter knows how your process boots and how to read its settings.
| Package | Covers |
|---|---|
z4j-django | Django 4.2 – 5.x. 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.10x+. Z4JAgent context manager in the lifespan. |
z4j-bare | Any Python 3.10+ process. Direct Agent(...) usage. Foundation of all others. |
All framework adapters delegate the actual agent runtime to z4j-bare.
Axis 2: Engine
Section titled “Axis 2: Engine”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+ | ✓ | partial | polyfill | celery-beat |
z4j-rq | RQ 1.15+ | ✓ | ✓ | polyfill | rq-scheduler |
z4j-dramatiq | Dramatiq 1.15+ | ✓ | no | polyfill | APScheduler |
z4j-huey | Huey 2.5+ | partial | partial | polyfill | huey-periodic |
z4j-arq | arq 0.25+ | polyfill | ✓ | polyfill | arq cron |
z4j-taskiq | taskiq 0.11+ | ✓ | ✓ | polyfill | taskiq-scheduler |
“polyfill” means: the brain implements the capability by re-enqueueing with the original payload and cancelling the original. The user sees one uniform button.
Axis 3: Scheduler
Section titled “Axis 3: Scheduler”A scheduler adapter knows how to discover, create, update, and delete periodic tasks.
| Package | Scheduler | Read | Write | Notes |
|---|---|---|---|---|
z4j-celerybeat | celery-beat | ✓ | ✓ (if django-celery-beat) | Filesystem beat is read-only |
z4j-rqscheduler | rq-scheduler | ✓ | read-only in v1.0 | Writable UI on v1.1 roadmap |
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-taskiq-scheduler | taskiq-scheduler | ✓ | ✓ | Depends on backend (Redis / file) |
Composing adapters
Section titled “Composing adapters”You install one framework + one or more engines + zero or more schedulers:
# Django + Celery + beatpip 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-apschedulerThe framework adapter discovers the installed engines and schedulers via entry points; no wiring code.
Custom adapters
Section titled “Custom adapters”The adapter interface is public but not yet documented for third-party authors - see roadmap. Drop-in custom engine adapters are on the v1.x list driven by community interest.
See the per-engine pages for the exact adapter surface of each.