No project description provided
Project description
TaskIQ-AWS
taskiq-aws is a plugin for taskiq that adds a new broker based on amazonm's sqs.
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-aws
Usage
Let's see the example with the sqs broker:
# broker.py
import asyncio
from taskiq_aws import SQSBroker
broker = SQSBroker(queue_url=http://localhost:4566)
@broker.task
async def best_task_ever() -> None:
"""Solve all problems in the world."""
await asyncio.sleep(5.5)
print("All problems are solved!")
async def main():
task = await best_task_ever.kiq()
print(await task.wait_result())
if __name__ == "__main__":
asyncio.run(main())
Launch the workers:
taskiq worker broker:broker
Then run the main code:
python3 broker.py
Brokers parameters:
queue_url- url to the sqs.aws_region- aws region of the queue.task_id_generator- custom task_id genertaor.result_backend- custom result backend.
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_aws-0.4.0.tar.gz.
File metadata
- Download URL: taskiq_aws-0.4.0.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.16 Linux/6.8.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3656e3fadd9a856b7693599c38fc7e3001aabb8ff5e94d7899fd515400d2fff
|
|
| MD5 |
1c4f216c0b810378e316397300467f59
|
|
| BLAKE2b-256 |
aac0ee09f1e12ad7fd87250549a7c5a9e86e8cebdc61e79c22b2d742db2fb0dc
|
File details
Details for the file taskiq_aws-0.4.0-py3-none-any.whl.
File metadata
- Download URL: taskiq_aws-0.4.0-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.16 Linux/6.8.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba3d4de7d1681dac1b832b2530f1dbd9d6a698e82bae85438b1fd998f39c254d
|
|
| MD5 |
1e0ef424fa86436ba0f9aa07e7bad1c6
|
|
| BLAKE2b-256 |
2f3855d2e7c3f459250bd42009b14cd62cd86b2ceca8a900e2bde58e0c6d80f2
|