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 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.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+ 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 taskiqscheduler

“polyfill” means: z4j implements the capability by re-enqueueing with the original payload and cancelling the original. The user sees one uniform button.

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 Writable UI not yet shipped
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 Depends on backend (Redis / file)

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.