taskiq 0.12.4


pip install taskiq

  Latest version

Released: May 08, 2026


Meta
Author: Pavel Kirilin
Maintainer: Pavel Kirilin
Requires Python: <4,>=3.10

Classifiers

Development Status
  • 3 - Alpha

Intended Audience
  • Developers

License
  • OSI Approved :: MIT License

Operating System
  • OS Independent

Programming Language
  • Python
  • Python :: 3
  • Python :: 3 :: Only
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
  • Python :: 3.14

Topic
  • System :: Networking

Typing
  • Typed

PyPI - Python Version PyPI PyPI - Downloads


Documentation: https://taskiq-python.github.io/

What is taskiq?

Taskiq is an asynchronous distributed task queue for python. This project takes inspiration from big projects such as Celery and Dramatiq. But taskiq can send and run both the sync and async functions, has integration with popular async frameworks, such as FastAPI and AioHTTP.

Also, we use PEP-612 to provide the best autosuggestions possible. All code is type-hinted.

Installation

This project can be installed using pip:

pip install taskiq

Or it can be installed directly from git:

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

Usage

At first you need to create a broker. Broker is an object that can communicate to workers using distributed queues.

We have different brokers for different queue backends. For example, we have a broker for NATS, Redis, RabbitMQ, Kafka and even more. Choose the one that fits you and create an instance.

from taskiq_nats import JetStreamBroker

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

Declaring tasks is as easy as declaring a function. Just add a decorator to your function and you are ready to go.

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())

The message is going to be sent to the broker and then to the worker. The worker will execute the function. To start worker processes, just run the following command:

taskiq worker path.to.the.module:broker

Where path.to.the.module is the path to the module where the broker is defined and broker is the name of the broker variable.

If you have tasks in different modules, you can ask taskiq to automatically import them by passing the --fs-discover flag:

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

It will import all modules called tasks.py in the current directory and all subdirectories.

Also, we support hot reload for workers. To enable it, just pass the --reload flag. It will reload the worker when the code changes (To use it, install taskiq with reload extra. E.g pip install taskiq[reload]).

Also, we have cool integrations with popular async frameworks. For example, we have an integration with FastAPI or AioHTTP. You can use it to reuse dependencies from your web app in your tasks.

Read about all features in our documentation: https://taskiq-python.github.io/

Local development

Linting

We use pre-commit to do linting locally.

After cloning this project, please install pre-commit. It helps fix files before committing changes.

pre-commit install

Testing

Pytest can run without any additional actions or options.

pytest

Docs

To run docs locally, you need to install yarn.

First, you need to install dependencies.

yarn install

After that you can set up a docs server by running:

yarn docs:dev
0.12.4 May 08, 2026
0.12.3 May 04, 2026
0.12.2 Apr 18, 2026
0.12.1 Dec 07, 2025
0.12.0 Nov 26, 2025
0.11.20 Oct 30, 2025
0.11.19 Oct 23, 2025
0.11.18 Jul 15, 2025
0.11.17 Apr 27, 2025
0.11.16 Mar 25, 2025
0.11.15 Mar 25, 2025
0.11.14 Mar 15, 2025
0.11.13 Feb 26, 2025
0.11.12 Feb 24, 2025
0.11.11 Feb 04, 2025
0.11.10 Dec 12, 2024
0.11.9 Nov 21, 2024
0.11.8 Nov 20, 2024
0.11.7 Aug 15, 2024
0.11.6 Jun 17, 2024
0.11.5 Jun 14, 2024
0.11.4 Jun 11, 2024
0.11.3 Apr 27, 2024
0.11.2 Apr 26, 2024
0.11.1 Apr 20, 2024
0.11.0 Feb 05, 2024
0.10.4 Dec 03, 2023
0.10.3 Nov 30, 2023
0.10.2 Oct 19, 2023
0.10.1 Oct 18, 2023
0.10.0 Oct 17, 2023
0.9.3 Oct 11, 2023
0.9.2 Oct 01, 2023
0.9.1 Sep 26, 2023
0.9.0 Sep 15, 2023
0.8.8 Sep 09, 2023
0.8.7 Sep 03, 2023
0.8.6 Jul 23, 2023
0.8.5 Jul 21, 2023
0.8.4 Jul 18, 2023
0.8.3 Jul 14, 2023
0.8.2 Jul 12, 2023
0.8.1 Jul 11, 2023
0.8.0 Jul 10, 2023
0.7.2 Jun 17, 2023
0.7.1 Jun 11, 2023
0.7.0 Jun 11, 2023
0.6.0 May 27, 2023
0.5.0 May 21, 2023
0.4.3 May 09, 2023
0.4.2 May 06, 2023
0.4.1 Apr 17, 2023
0.4.0 Apr 09, 2023
0.3.5 Mar 31, 2023
0.3.4 Mar 28, 2023
0.3.3 Mar 27, 2023
0.3.2 Mar 26, 2023
0.3.1 Mar 26, 2023
0.3.0 Mar 25, 2023
0.2.2 Mar 22, 2023
0.2.1 Mar 21, 2023
0.2.0 Mar 13, 2023
0.1.8 Jan 26, 2023
0.1.7 Jan 23, 2023
0.1.6 Jan 07, 2023
0.1.5 Jan 07, 2023
0.1.4 Dec 18, 2022
0.1.3 Nov 08, 2022
0.1.2 Sep 29, 2022
0.1.1 Sep 16, 2022
0.1.0 Sep 12, 2022
0.0.9 Aug 30, 2022
0.0.8 Aug 29, 2022
0.0.7 Aug 23, 2022
0.0.6 Aug 23, 2022
0.0.5 Aug 23, 2022
0.0.4 Aug 12, 2022
0.0.3 Aug 10, 2022
0.0.2 Aug 10, 2022
0.0.1 Aug 08, 2022

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
aiohttp (>=3)
anyio (>=4)
packaging (>=19)
pycron (>=3.0.0)
pydantic (<=3.0,>=1.0)
taskiq-dependencies (<2,>=1.3.1)
typing-extensions (>=3.10.0.0)