Skip to main content

z4j-taskiq

PyPI version Python License

The TaskIQ engine adapter for z4j.

Streams supported TaskIQ task lifecycle events from your async workers to z4j and accepts operator control actions from the dashboard. Pair with z4j-taskiqscheduler to surface taskiq-scheduler periodic jobs.

Compatibility

  • TaskIQ 0.11+ (no upper bound)
  • Python 3.11+

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

What it ships

Capability Notes
Task lifecycle events received, started, succeeded, retried, failed
Task discovery runtime broker task registry (broker.get_all_tasks())
Submit task enqueue a registered task against the TaskIQ broker via .kiq(); an omitted queue or z4j's logical default queue uses the broker default
Reconcile task via the configured TaskIQ result backend

Async-native, uses TaskIQ's middleware hook system.

TaskIQ network brokers and result backends belong to the event loop that started them, while the z4j agent runs on its own background loop. Attach the middleware before broker startup so the adapter records the broker's owner loop and marshals submit and reconcile calls back to it:

adapter = TaskiqEngineAdapter(broker=broker)
attach_to_broker(broker, adapter=adapter)

Attach before the TaskIQ CLI or your application lifespan starts the broker; that host owns broker startup and shutdown. Do not start an already host-managed broker a second time. A standalone manual client must start and shut down its broker exactly once in its own lifecycle.

If installation itself runs inside a TaskIQ startup callback without the middleware, pass broker_loop=asyncio.get_running_loop() explicitly. Do not capture a temporary loop created by asyncio.run(); that loop closes when the call returns. Until either startup binding or explicit binding has happened, submit and result-backend probes fail closed; they never guess that the z4j agent's background loop owns the broker.

Control actions beyond submit (retry, cancel, bulk retry, purge queue) are not yet supported. TaskIQ's broker-agnostic design means each broker needs its own implementation, so the adapter does not advertise these actions and z4j refuses them for TaskIQ engines until per-broker support lands.

TaskIQ has no portable named-queue, ETA, or priority override. Submit accepts an omitted queue and the canonical logical queue default, both of which use the broker's configured default. Any other queue name, ETA, or priority is rejected before enqueue rather than silently misrouted.

Install

pip install z4j-taskiq z4j-taskiqscheduler

Pair with a framework adapter:

pip install z4j-fastapi z4j-taskiq z4j-taskiqscheduler
pip install z4j-bare    z4j-taskiq z4j-taskiqscheduler   # framework-free worker

Pairs with

Reliability

  • Lifecycle-capture failures are isolated from TaskIQ middleware and task code; capture hooks make no brain network request inline.
  • The in-process event queue and SQLite outbound buffer are bounded. Queue overflow drops new events and buffer pressure evicts oldest rows; both losses are logged.

Documentation

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

License

Apache-2.0, see LICENSE.

Metadata

Release files for z4j-taskiq 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-taskiq 1.13.0
File Size Uploaded Provenance
z4j_taskiq-1.13.0.tar.gz 28.5 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 47.8 kB

Release files / z4j_taskiq-1.13.0.tar.gz

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

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

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

Security for z4j-taskiq 1.13.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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