What problem does it solve?
Taskiq removes the complexity of running asynchronous, distributed background work in Python applications by providing brokers, workers, scheduling, and dependency injection so developers can offload long-running jobs and schedule recurring tasks reliably.
Core Features & Use Cases
- Brokers & Result Backends: Support for InMemory, RabbitMQ (aio-pika), NATS, and Redis-based queues plus pluggable result backends for storing task results.
- Worker & Scheduler Management: Run worker processes, file-system discovery, reloadable workers, label and Redis-based scheduling, and lifecycle-aware startup/shutdown for frameworks like FastAPI.
- Dependency Injection & Testing: Resolve FastAPI-style dependencies inside tasks, use TaskiqDepends for injection, and use InMemoryBroker patterns for deterministic testing and awaiting tasks.
- Use Case: Offload email sending, data processing, or database writes from web requests, schedule periodic aggregation jobs, and run background pipelines across multiple worker nodes.
Quick Start
Set up a broker, declare an async task with @broker.task, start the broker in your app lifespan, and run a taskiq worker process to process queued jobs.