Kombu integration for taskiq
Project description
taskiq-kombu
taskiq-kombu is a plugin for taskiq that adds a new broker based on kombu.
The broker makes use of kombu Consumer and Producer so you can use any kombu transport as taskiq broker.
Installation
To use this project you must have installed core taskiq library:
pip install taskiq
This project can be installed using pip:
pip install taskiq-kombu
Or using uv:
uv add taskiq-kombu
Usage
An example with the broker
# example.py
import asyncio
from kombu import Connection, Queue
from taskiq_kombu import KombuBroker
broker = KombuBroker(
connection=Connection("sqla+sqlite:///tasks.db"),
queues=[
Queue("my_queue", exchange="", routing_key="my_queue"),
],
)
@broker.task("my_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())
Run example
shell 1: start a worker
$ taskiq worker example:broker
shell 2: run the example script
$ python example.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file taskiq_kombu-0.1.0.tar.gz.
File metadata
- Download URL: taskiq_kombu-0.1.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8aafceb8bb656c4f39455c97147d078cb0e03f38df3bac0715901c0f4a0cf4d2
|
|
| MD5 |
3dd928b823137ad2678330a067f5cfd1
|
|
| BLAKE2b-256 |
36eaeca12b1e8ca26d815905a5a765af7ef7ba7dc68ff4b6031caab2fbc19f0f
|
Provenance
The following attestation bundles were made for taskiq_kombu-0.1.0.tar.gz:
Publisher:
release.yml on soapun/taskiq-kombu
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
taskiq_kombu-0.1.0.tar.gz -
Subject digest:
8aafceb8bb656c4f39455c97147d078cb0e03f38df3bac0715901c0f4a0cf4d2 - Sigstore transparency entry: 402493425
- Sigstore integration time:
-
Permalink:
soapun/taskiq-kombu@7d8467994aef3340c419185c4f3ea4c97a221ac4 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/soapun
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7d8467994aef3340c419185c4f3ea4c97a221ac4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file taskiq_kombu-0.1.0-py3-none-any.whl.
File metadata
- Download URL: taskiq_kombu-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0894e2fd581a2787a68b79ae953a01a66223c91773f4758f5f2959a88b49f90f
|
|
| MD5 |
66a47fc2263cc47a31c24f488cb3ed7b
|
|
| BLAKE2b-256 |
c9aee6c100c9180f11601f5156ab4a0628d9c3d019bb89c7f1c007eae7cb66e8
|
Provenance
The following attestation bundles were made for taskiq_kombu-0.1.0-py3-none-any.whl:
Publisher:
release.yml on soapun/taskiq-kombu
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
taskiq_kombu-0.1.0-py3-none-any.whl -
Subject digest:
0894e2fd581a2787a68b79ae953a01a66223c91773f4758f5f2959a88b49f90f - Sigstore transparency entry: 402493432
- Sigstore integration time:
-
Permalink:
soapun/taskiq-kombu@7d8467994aef3340c419185c4f3ea4c97a221ac4 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/soapun
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7d8467994aef3340c419185c4f3ea4c97a221ac4 -
Trigger Event:
release
-
Statement type: