Skip to main content

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.

Metadata

Release files for taskiq-aws 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for taskiq-aws 0.4.0
File Size Uploaded
taskiq_aws-0.4.0.tar.gz 8.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for taskiq-aws 0.4.0
File Interpreter ABI Platform
taskiq_aws-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.9 kB

Release files / taskiq_aws-0.4.0.tar.gz

Download URL taskiq_aws-0.4.0.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a3656e3fadd9a856b7693599c38fc7e3001aabb8ff5e94d7899fd515400d2fff
BLAKE2b-256 checksum
How to use checksums
aac0ee09f1e12ad7fd87250549a7c5a9e86e8cebdc61e79c22b2d742db2fb0dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.16 Linux/6.8.0-1021-azure

Release files / taskiq_aws-0.4.0-py3-none-any.whl

Download URL taskiq_aws-0.4.0-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba3d4de7d1681dac1b832b2530f1dbd9d6a698e82bae85438b1fd998f39c254d
BLAKE2b-256 checksum
How to use checksums
2f3855d2e7c3f459250bd42009b14cd62cd86b2ceca8a900e2bde58e0c6d80f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.16 Linux/6.8.0-1021-azure

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page