Skip to main content

platonic-sqs

Coverage Python Version wemake-python-styleguide

A platonic wrapper for Amazon SQS queue service. Abstracts away the implementation details of SQS, providing you with a clean and typed queue interface.

Installation

pip install platonic-sqs

Send

from platonic.sqs.queue import SQSSender

numbers_out = SQSSender[int](
    url='https://sqs.us-west-2.amazonaws.com/123456789012/queue-name',
)

numbers_out.send(15)
numbers_out.send_many([1, 1, 2, 3, 5, 8, 13])

Receive & acknowledge

from platonic.sqs.queue import SQSReceiver
from platonic.timeout import ConstantTimeout
from datetime import timedelta

incoming_numbers = SQSReceiver[int](
    url='https://sqs.us-west-2.amazonaws.com/123456789012/queue-name',
    # Thus we prevent the receiver from blocking forever if queue is empty
    timeout=ConstantTimeout(period=timedelta(minutes=3)),
)

# If the queue is empty, this call with block until there is a message.
cmd = incoming_numbers.receive()

assert cmd.value == 15
# Do complicated stuff with the value
print(cmd.value * 1234 + 5767)

incoming_numbers.acknowledge(cmd)

License

MIT

Credits

Metadata

Release files for platonic-sqs 1.2.8

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

Source distribution (sdist)

Source distribution for platonic-sqs 1.2.8
File Size Uploaded Provenance Actions
platonic-sqs-1.2.8.tar.gz 8.7 kB Without provenance Details for platonic-sqs-1.2.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for platonic-sqs 1.2.8
File Interpreter ABI Platform Actions
platonic_sqs-1.2.8-py3-none-any.whl Python 3 none any Details for platonic_sqs-1.2.8-py3-none-any.whl

Total release size: 18.5 kB

Release files / platonic-sqs-1.2.8.tar.gz

Download URL platonic-sqs-1.2.8.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b9cdc8ab18a2a0169061a5f0ff041137cc4266d741192f600171832a6aa26974
BLAKE2b-256 checksum
How to use checksums
1bd5efc8ad4afd31919ad9d62b312c90ae0dfdceb8ad9a98d2b28a0e470b0676
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.10 CPython/3.8.6 Linux/5.4.0-86-generic

Release files / platonic_sqs-1.2.8-py3-none-any.whl

Download URL platonic_sqs-1.2.8-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5060c24e9abc212af49d73b19e3e18eb1f6c8e470f078ff0e54c7026ebb6be58
BLAKE2b-256 checksum
How to use checksums
1c8f44e298a5502d0c53b91df8f785b6547812486157c387f83a10479881187d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.10 CPython/3.8.6 Linux/5.4.0-86-generic

Security for platonic-sqs 1.2.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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