A fast, Redis-backed task queue manager for Python. Simple API for distributed task processing with reliability built in.
Distributed task processing shouldn't require a PhD in message brokers. Kew distills the complexity of task queues into a clean Python API, backed by Redis's battle-tested reliability. Declare a task with a decorator, enqueue it with a call, and let Kew handle the rest — retries, priorities, dead letters, all of it.
from kew import TaskQueue
queue = TaskQueue(redis_url="redis://localhost")
@queue.task(retries=3, priority="high")
async def process_image(url: str):
image = await download(url)
thumbnail = resize(image, width=256)
return {"status": "complete", "url": thumbnail.url}
# Enqueue from anywhere
await process_image.enqueue("https://example.com/photo.jpg")