Library / SDK
taskiq-python/taskiq avatar
taskiq-python/taskiq

Taskiq: a task queue where the broker lives in a separate package and kiq() sends the message

Distributed task queue with full async support

2,383 stars164 forksPythonMIT

At a glance

What is it?
Taskiq is an asyncio-first distributed task queue for Python with a core package, one broker package per backend, and a worker started from the command line. Version 0.13.0 came out on 26 September 2026.
Who is it for?
Choose Taskiq if your code base is already asyncio, you want type-hinted task calls, and you are fine installing a separate broker package for NATS, Redis, RabbitMQ or Kafka. Stay with something older if you need a production-stable label, because pyproject.toml classifies the project as Development Status 3 - Alpha.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 25, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • taskiq-python/taskiq2,383 ★ · +31
Star history
Repository2026-10-082026-11-25
taskiq-python/taskiq2.4k2.4k

31 Stars in the last 48 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The core package ships no broker: you pick one from a separate repository

The README starts usage with a broker, described as an object that communicates with workers using distributed queues. There are different brokers for different backends, and each lives in its own project under the taskiq-python organization: NATS (taskiq-nats), Redis (taskiq-redis), RabbitMQ (taskiq-aio-pika), Kafka (taskiq-aio-kafka), and others the README does not list.

The README's example imports `JetStreamBroker` from `taskiq_nats` and creates it with `JetStreamBroker("nats://localhost:4222", queue="my_queue")`. So `pip install taskiq` alone does not give you something that can send a message anywhere useful. You install the core and the broker package for your queue.

That split keeps the core small, with dependencies limited to aiohttp, anyio, pycron, pydantic, taskiq_dependencies and typing-extensions on older Pythons. The price is version coordination: the core and the broker are released separately, so check that the broker package supports the core version you installed.

A decorator declares the task, and kiq() puts it on the wire

Declaring a task takes a decorator. In the README's example:

python
import asyncio

from taskiq_nats import JetStreamBroker

broker = JetStreamBroker("nats://localhost:4222", queue="my_queue2")

@broker.task
async def my_task(a: int, b: int) -> None:
    print("AB", a + b)

async def main():
    await broker.startup()

    await my_task.kiq(1, 2)

    await broker.shutdown()

if __name__ == "__main__":
    asyncio.run(main())

Calling `my_task.kiq(1, 2)` sends the message to the broker, and the broker passes it to a worker, which executes the function. The producer must call `broker.startup()` before sending and `broker.shutdown()` afterward. Forget the startup call and the connection to the queue never opens.

The README says Taskiq can send and run both sync and async functions, which sets it apart from the projects it cites as inspiration, Celery and Dramatiq.

Starting workers: a module path, a flag for task discovery and a reload extra

Workers start from the command line:

bash
taskiq worker path.to.the.module:broker

`path.to.the.module` is the module where the broker is defined and `broker` is the variable name. Tasks in other modules can be found automatically with the discovery flag:

bash
taskiq worker path.to.the.module:broker --fs-discover

That imports every module called `tasks.py` in the current directory and all subdirectories. A task defined in a file with any other name is not found, and the worker will report it as unknown when a message arrives for it.

Hot reload is available with `--reload`, which restarts the worker when code changes. It needs the extra, installed as `pip install taskiq[reload]`. The command line is registered in `pyproject.toml` as the script `taskiq`, with `worker` and `scheduler` as entries under `taskiq_cli`, so the scheduler is a command of its own.

Installing from PyPI or from git, on Python 3.10 and newer

The README gives two install routes:

bash
pip install taskiq

and, for the development version:

bash
pip install git+https://github.com/taskiq-python/taskiq

`pyproject.toml` sets `requires-python = ">=3.10,<4"` and lists classifiers for Python 3.10 through 3.14. The package is typed (the classifier `Typing :: Typed`) and OS independent.

The README explains the typing claim: Taskiq uses PEP-612 to provide the best autosuggestions possible, and all code is type-hinted. PEP-612 covers parameter specification, so a call like `my_task.kiq(1, 2)` can be checked against the signature of `my_task` in an editor.

Optional extras exist beyond `reload`. The `pyproject.toml` excerpt shows `cbor`, which pulls in `cbor2>=5`, and `metrics`, with the rest cut off. An OpenTelemetry instrumentor is registered as an entry point, `taskiq.instrumentation:TaskiqInstrumentor`.

FastAPI and AioHTTP integrations reuse the web app's dependencies

The README names integrations with FastAPI and AioHTTP, both with pages in the documentation. The stated use is to reuse dependencies from your web app inside your tasks. That fits the dependency package, `taskiq_dependencies`, which is a declared requirement of the core.

The result is that a task can ask for the same database session or settings object that a route handler gets, instead of building it again. How lifetimes are handled when the worker is a separate process from the web server is a question for the integration pages, since the README does not cover it.

The documentation lives at taskiq-python.github.io and is built with VuePress. The repository's `package.json` is named `taskiq-docs` and has `docs:dev`, `docs:build` and `docs:serve` scripts, and the README tells contributors to install yarn and run `yarn docs:dev`, although the lock file in the repository is `pnpm-lock.yaml` and `packageManager` pins pnpm 10.24.0.

Alpha classifier, rapid releases: what the version history says

The classifier in `pyproject.toml` reads `Development Status :: 3 - Alpha`. The release list shows 0.13.0 on 26 September 2026, 0.12.6 on 29 August 2026 and 0.12.5 on 21 August 2026, so releases come every few weeks and the version is still below 1.0. The last push was on 12 October 2026, and the repository is not archived.

For a team, that pairing means frequent releases and no promise of API stability. Pin the version in your lock file, and read the changelog, which `pyproject.toml` points to as the GitHub releases page, before each upgrade.

The README gives no benchmark figures, no throughput numbers and no comparison table against Celery or Dramatiq. It states only that Taskiq takes inspiration from them. Anyone searching for a comparison with Celery has to build their own test with their own broker.

Local development: pre-commit, plain pytest, and a uv lock file

Contributors run `pre-commit install` after cloning, for linting before commits. Tests run with `pytest` and need no extra options, according to the README. The repository holds `uv.lock` and `.python-version`, which suggest uv for environments, though the README names only pip.

The top-level listing shows `taskiq/` for the package, `tests/`, `docs/`, `imgs/`, and `.pre-commit-config.yaml`. The author and maintainer in `pyproject.toml` is Pavel Kirilin, and the license is MIT with a LICENSE file declared.

Bug reports go to the GitHub issue tracker, and the Documentation and Homepage URLs both point at the docs site. There is no chat or forum link in the README, so questions that the docs do not answer end up as issues.

Editorial conclusion

Choose Taskiq if your code base is already asyncio, you want type-hinted task calls, and you are fine installing a separate broker package for NATS, Redis, RabbitMQ or Kafka. Stay with something older if you need a production-stable label, because pyproject.toml classifies the project as Development Status 3 - Alpha. Before committing, write one task, start it with taskiq worker, and watch what happens when the worker restarts mid-task, since the README does not document retries.

Frequently asked questions

What is Taskiq?

Taskiq is an asynchronous distributed task queue for Python. It can send and run both sync and async functions, and it integrates with FastAPI and AioHTTP.

What are some alternatives to Celery for Python task queues?

Taskiq is one. The README says it takes inspiration from Celery and Dramatiq, and it adds async-first design, type hints through PEP-612 and brokers for NATS, Redis, RabbitMQ and Kafka.

How do I start a Taskiq worker?

Run `taskiq worker path.to.the.module:broker`, where the path points to the module defining your broker. Add `--fs-discover` to import every tasks.py automatically.

Official sources

  1. Issues
  2. License: MIT
  3. README
  4. Releases
  5. taskiq-python/taskiq on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/taskiq-python-taskiq.svg)](https://hysenlabs.com/projects/taskiq-python-taskiq)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/taskiq-python-taskiq.svg)](https://hysenlabs.com/projects/taskiq-python-taskiq)

Was this useful?