Skip to main content

z4j-dramatiq

PyPI version Python License

The Dramatiq engine adapter for z4j.

Streams supported Dramatiq actor lifecycle events from your workers to the z4j and accepts operator control actions from the dashboard. Dramatiq has no upstream scheduler, so for periodic schedules pair with z4j-scheduler.

Compatibility

  • Dramatiq 1.14+ (no upper bound)
  • Python 3.11+

Full per-adapter matrix at https://docs.z4j.com/reference/compatibility/.

What it ships

Capability Notes
Message lifecycle events received, started, succeeded, retried, failed
Actor discovery Dramatiq's runtime broker registry
Submit direct against the Dramatiq broker
Retry only with complete operator-supplied replacement args and kwargs
Cancel pending task requires z4j-dramatiq[abort] and Abortable middleware; does not interrupt running work
Purge queue with confirm-token guard
Reconcile task reports honest unknown (Dramatiq has no queryable-by-id result store); the brain's event-derived state stays authoritative

Captured via Dramatiq's middleware hook system, your existing actors do not need to be decorated or modified.

Install

pip install z4j-dramatiq

Bulk retry and dead-letter replay are not advertised because stock Dramatiq does not expose recoverable completed-message or dead-letter APIs. Pending-task cancel is advertised only when the external dramatiq-abort Abortable middleware is installed. z4j uses its pending-only mode because interrupting a running task can interact with Dramatiq retries and enqueue another attempt.

Pair with a framework adapter:

pip install z4j-django  z4j-dramatiq   # Django
pip install z4j-flask   z4j-dramatiq   # Flask
pip install z4j-fastapi z4j-dramatiq   # FastAPI
pip install z4j-bare    z4j-dramatiq   # framework-free worker

For schedules, install z4j-scheduler as a separate process.

Reliability

  • Lifecycle-capture failures are isolated from Dramatiq middleware and actor code; capture hooks make no brain network request inline.
  • The in-process event queue and SQLite outbound buffer are bounded. A full queue evicts its oldest queued event to admit the new one, up to three times. Queue overflow drops new events only if that cannot make room. Buffer pressure evicts oldest rows. Every loss is logged.

Documentation

Full docs at docs.z4j.com/engines/dramatiq/.

License

Apache-2.0, see LICENSE.

Metadata

Release files for z4j-dramatiq 1.13.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for z4j-dramatiq 1.13.0
File Size Uploaded
z4j_dramatiq-1.13.0.tar.gz 47.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for z4j-dramatiq 1.13.0
File Interpreter ABI Platform
z4j_dramatiq-1.13.0-py3-none-any.whl Python 3 none any Details

Total release size: 85.0 kB

Release files / z4j_dramatiq-1.13.0.tar.gz

Download URL z4j_dramatiq-1.13.0.tar.gz
Size 47.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e831eec128c10ca9e38d21b2dd4cf7bfa01a8ba6113ffcf2b1da57b9e2be46f4
BLAKE2b-256 checksum
How to use checksums
792bf83a790efd7686255071aa67f143286b134fbedb11f72c89572805579f82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / z4j_dramatiq-1.13.0-py3-none-any.whl

Download URL z4j_dramatiq-1.13.0-py3-none-any.whl
Size 37.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
132aa5aadbe43301f9c49ab74ebc5d7bee0f5cf2b9d5f46308e48912921169a8
BLAKE2b-256 checksum
How to use checksums
a81ed4377befbe196312faf723e76106878a0eda33b2c230e42161e9862dd4bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

1.13.0 This release

2 release files

1.11.0

2 release files

1.10.0

2 release files

1.9.1

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.7

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.1.2

2 release files

1.0.1

2 release files

1.0.0

2 release 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