1.1.0 · pip install blitzq

A fast, async-native task queue for Python

BlitzQ runs background jobs on asyncio and Redis, with explicit reliable/fast delivery modes, retries, scheduling and multi-queue routing - framework-agnostic, with FastAPI, Django and Flask helpers.

from blitzq import Queue

queue = Queue(name="default", redis_url="redis://localhost:6379/0")

@queue.task(retries=3)
async def process_order(order_id: str) -> dict:
    return {"order_id": order_id, "processed": True}

task = await process_order.enqueue("ORD-123")
result = await queue.get_result(task.id, timeout=10)

Async-native workers

Thousands of concurrent async def tasks per process; sync functions on a bounded thread pool; CPU-bound functions on a process pool.

Two explicit delivery modes

reliable (Redis Streams, at-least-once, crash recovery) and fast (Redis lists, at-most-once, fewest round-trips) - you choose per queue.

Batteries included

Retries with backoff and jitter, dead letters, delayed tasks, cron/interval periodic tasks, timeouts, cancellation, results, multi-queue routing, per-queue concurrency, priority, rate limiting.

Framework-agnostic

A plain Python core with optional FastAPI/Starlette, Django and Flask helpers - use it from any stack.

Race BlitzQ against Celery

Pick a workload and a task count, then watch both clear the queue at their real measured throughput - including a worker-pool preset using --workers N, new in 1.1.0.

Workload
Tasks to run

Bare function call - pure dispatch overhead.

BlitzQ1,000 tasks queued
Celery1,000 tasks queued

Bars race at the real measured throughput ratio, time-compressed to fit the screen.

Benchmarked against Celery and Huey

Measured, not estimated - 5 repetitions per workload, medians reported. BlitzQ wins most workloads, and the report says so when it doesn't.

BlitzQ
63,542 tasks/sec★
Celery
3,139 tasks/sec
Huey
6,024 tasks/sec

Median of 5 runs, synthetic task bodies, higher is better. BlitzQ is not fastest everywhere - CPU-bound work on the default thread executor is a known weak spot; switch to executor="process" and it ties. Full methodology and raw numbers in the comparison report.

Notified, not polled - and now cheap at scale

get_result() pushes instead of polling since 1.0.1. As of 1.1.0 it also shares one Redis connection per process instead of one per waiting call. Drag to see what that meant in practice.

Tasks awaited at once
1001,0002,0005,00010,000
Before: one connection per waiter2,000 connections
After: one shared connection per process38 connections

get_result() waits on a push notification instead of polling. Each Redis broker now shares one PSUBSCRIBE connection per process and fans incoming notifications out to local waiters in-process, instead of opening a dedicated connection per waiting call. At 10,000 tasks awaited concurrently this used to need a connection pool sized in the thousands and still occasionally failed outright; now it runs cleanly on a couple hundred connections total across every worker and client process combined.

Known gaps, stated plainly

What's out of scope, why, and what's already been fixed - including why get_result() shares one connection instead of opening one per waiting call.

Read the roadmap