Skip to content

ArdiQ

A fast distributed task queue with a Rust core and a clean Python API, backed by Redis streams.

PyPI versionPython versionsCILicense: MIT

ArdiQ runs the worker loop and all Redis I/O in Rust (via PyO3 + tokio); you write tasks in plain Python. The two meet at a single async callback, with the GIL held only for the microseconds it takes to start a task and read its result — so a single process handles high concurrency on a tiny memory footprint.

Rust core, off the GIL

The loop and every Redis round-trip run on tokio, in Rust — top-tier throughput at roughly a third of the memory of comparable queues.

Batteries included

Priorities, delayed, scheduled & cron tasks, automatic retries with backoff, per-task timeouts, results with TTL, and status introspection.

Sync & async tasks

async def tasks run on the loop; blocking def tasks run in a thread pool so they never freeze the worker.

Crash recovery

In-flight tasks of a dead worker are reclaimed via Redis consumer groups (XAUTOCLAIM) and a heartbeat.

example.py
from ardiq import Ardiq
app = Ardiq(redis_url="redis://localhost:6379", queue_name="example")
@app.task()
async def add(a: int, b: int) -> int:
return a + b
Terminal window
$ ardiq run example:app