Skip to main content

z4j

PyPI version Python License

The all-in-one z4j umbrella package. Open-source control plane for Python task queues.

One pip install z4j brings z4j (dashboard + API) into your environment. Use extras to pull the agent packages your workers need: framework adapters (Django, Flask, FastAPI), engine adapters (Celery, RQ, Dramatiq, Huey, arq, TaskIQ), and their schedule companions. Every adapter cross-versions to the same z4j release line, so the floors stay in sync without manual pinning.

Compatibility

Brain: Python 3.11+, PostgreSQL 18.3+ recommended (minimum 17), or bundled SQLite.

Every adapter pulled through the [django,celery] / [fastapi,arq] / etc. extras carries its own framework / engine version floor. Full per-adapter matrix at https://z4j.dev/reference/compatibility/.

What is z4j

z4j is one product split into 20 PyPI packages so each piece can be installed only where it's needed. The umbrella z4j is the operator-friendly entry point that wires the right combination together for you.

The architecture is straightforward:

  • One brain deployment per environment. Dashboard, API, audit log. SQLite runs one worker process; PostgreSQL deployments can use multiple workers or replicas against shared state.
  • One agent per worker / app process. A thin pip package that imports inside your Django / Flask / FastAPI app or your Celery / RQ / Dramatiq worker, connects over an authenticated WebSocket (or the configured HTTPS long-poll transport), and streams task / worker / queue / schedule events.
  • Operator worker actions flow back through the agent transport. Retry, cancel, bulk retry, purge, and restart use the agent command channel. Schedule changes are stored and audited by the brain; the scheduler consumes them through its separate gRPC protocol.

The z4j server distribution is AGPL v3 and runs as its own process. The agent packages imported by applications are Apache-2.0 and can be installed independently of the server distribution; consult the license terms for the obligations that apply to your deployment.

What's in the box

Try the live demo (no install)

demo.z4j.dev is the dashboard SPA running in your browser against pre-baked fake data. One click on the pre-filled login lands you in a populated control plane with four sample projects: Celery + celery-beat (small healthy starter), FastAPI + arq + arq-cron, Django + Celery + django-celery-beat with a current incident scenario (failing schedule, alert firing, worker offline), and a mixed-engine z4j-scheduler showcase driving Celery + RQ + Dramatiq workers from one place.

It is a navigable preview, not a sandbox: every Create / Update / Delete button toast-blocks (This is a demo. Refresh to reset; install z4j to make changes for real.), no real backend is connected, refresh resets to a clean state. Useful before you commit to pip install.

Install

The minimum useful install is z4j plus the framework + engine your stack actually uses. Use the extras instead of pinning each package by hand:

pip install z4j                          # brain only
pip install 'z4j[django,celery]'         # Django + Celery + celery-beat
pip install 'z4j[fastapi,arq]'           # FastAPI + arq + arq-cron
pip install 'z4j[flask,rq]'              # Flask + RQ + rq-scheduler

Where a dedicated schedule companion exists, the engine extra pulls it too (for example, [celery] pulls z4j-celery + z4j-celerybeat). The [dramatiq] extra installs only z4j-dramatiq; [apscheduler] is available separately for applications that use APScheduler. The engine-agnostic dynamic scheduler is its own service and its own package, install it alongside the brain when you want it:

pip install z4j-scheduler

That same-environment install supplies the brain's optional gRPC runtime. If the scheduler runs in a separate environment, install z4j[scheduler-grpc] on the brain as well and configure its mTLS scheduler listener.

Then start z4j:

z4j serve

The packaged SQLite path persists independent HMAC, session, audit-chain, and metrics secrets on first boot, runs Alembic migrations, creates ~/.z4j/z4j.db, and prints a one-time setup URL to stderr that creates the first admin user. PostgreSQL does not auto-mint those secrets. Install its drivers with pip install 'z4j[postgres]', set Z4J_DATABASE_URL=postgresql+asyncpg://..., and explicitly configure Z4J_SECRET, Z4J_SESSION_SECRET, and the independent Z4J_AUDIT_CHAIN_SECRET, plus the production URL and allowed hosts described in the install guide.

Why use z4j

z4j is designed to replace separate, engine-specific operational surfaces with one control plane. It provides:

  • One dashboard across mixed engines (Celery + RQ + arq side by side, common operator workflow).
  • An RBAC-governed action surface for retry, cancel, bulk retry, purge, and restart.
  • An HMAC-chained audit log for changes made through z4j. It detects paths that skip the audit authority, but does not defend against a database role that can rewrite both the log and its chain state; the security threat model documents that boundary.
  • Live editing, without per-daemon restarts, for schedules owned by the engine-agnostic z4j scheduler.
  • Self-hosted with no unsolicited vendor telemetry or automatic version polling. Optional Sentry and OpenTelemetry exporters send data only when an operator installs and configures them. The brain contacts its configurable version URL only when an admin clicks Check for updates in Settings; the separate z4j upgrade command contacts PyPI only when an operator invokes it.

z4j is the boring, self-hosted, audit-friendly choice. Built for homelab operators who want one place to look, and for compliance-sensitive teams who need to answer "who did what when" at quarter-end.

Documentation

Full docs at z4j.dev. The install guide at z4j.dev/getting-started/install/ covers all three paths (pip-SQLite, Docker-SQLite, Docker-Postgres).

License

AGPL-3.0-or-later, see LICENSE. The z4j server distribution and frozen z4j-brain compatibility shim are AGPL. The independently installable shared core, agent packages, and scheduler are Apache-2.0; consult the license terms for the obligations that apply to your deployment. Commercial licenses available; contact licensing@z4j.com.

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-1.9.0.tar.gz (3.6 MB view details)

Uploaded Source

Built Distribution

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

z4j-1.9.0-py3-none-any.whl (2.0 MB view details)

Uploaded Python 3

File details

Details for the file z4j-1.9.0.tar.gz.

File metadata

  • Download URL: z4j-1.9.0.tar.gz
  • Upload date:
  • Size: 3.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for z4j-1.9.0.tar.gz
Algorithm Hash digest
SHA256 93e7b7431af7a64d0b097b19c3fc691ae4a1e2ed29dfa9728740d1a47d066ee8
MD5 9530f9422ffae262e277436d617cfd3c
BLAKE2b-256 ecfd164f011fe0705aeb0d515c40a40f0def901191084c7e269248939b7999a3

See more details on using hashes here.

File details

Details for the file z4j-1.9.0-py3-none-any.whl.

File metadata

  • Download URL: z4j-1.9.0-py3-none-any.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for z4j-1.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 769fb7eefe12449e3008aaadcba9856e714d040a7a5251a069a33833af37a938
MD5 c24bbfebee905722529e810d2f14fa5d
BLAKE2b-256 0f449fda74156d930a73c8a98b5c8dc8230bb5f954702705708924a35b1442e4

See more details on using hashes here.

Release history Release notifications | RSS feed

1.10.0

2 files

1.9.1

2 files

This release

1.9.0 This release

2 files

1.8.0

2 files

1.7.0

2 files

1.6.9

2 files

1.6.8

2 files

1.6.7

2 files

1.6.6

2 files

1.6.5

2 files

1.6.3

2 files

1.6.2

2 files

1.6.1

2 files

1.6.0

2 files

1.5.1

2 files

1.5.0

2 files

1.4.0

2 files

1.3.4

2 files

1.3.3

2 files

1.3.2

2 files

1.3.1

2 files

1.3.0

2 files

1.2.1

2 files

1.2.0

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.19

2 files

1.0.18

2 files

1.0.17

2 files

1.0.16

2 files

1.0.15

2 files

1.0.14

1 file

1.0.13

1 file

1.0.12

1 file

1.0.11

2 files

1.0.10

2 files

1.0.9

2 files

1.0.8

2 files

1.0.7

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

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