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+ and <1 (capped below the eventual TaskIQ 1.0 breaking-major)
  • 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 dashboard greys these actions out 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.12.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.12.0
File Size Uploaded
z4j_taskiq-1.12.0.tar.gz 28.0 kB Details

Built distribution (wheel)

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

Total release size: 47.0 kB

Release files / z4j_taskiq-1.12.0.tar.gz

Download URL z4j_taskiq-1.12.0.tar.gz
Size 28.0 kB
Tags Source
SHA-256 checksum
How to use checksums
369004290d19fb29a6cedd8d6ab19ede3eeed3c1c2b79ce763193810762c868c
BLAKE2b-256 checksum
How to use checksums
ce89d37a9353f2f8b9ee20303fe9967a841bc39e9afa3a9db022a3420a2192bb
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.12.0-py3-none-any.whl

Download URL z4j_taskiq-1.12.0-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6931cca717b86cf06f1d9e395e38b70023ddb02c5b33afae68db64b0a62a1f72
BLAKE2b-256 checksum
How to use checksums
bf9e1e1c28340825d27827cccfc686ee5095140633eb7f4c8cd627de054db855
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.12.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