Boto3 SQS Extended Client Library for Python
The Amazon SQS Extended Client Library for Python has been modelled after the original Amazon SQS Extended client library This python library enables you to manage Amazon SQS message payloads with Amazon S3. This is especially useful for storing and retrieving messages with a message payload size greater than the current SQS limit of 256 KB, up to a maximum of 2 GB. Specifically, you can use this library to:
-
Specify whether message payloads are always stored in Amazon S3 or only when a message's size exceeds 256 KB.
-
Send a message that references a single message object stored in an Amazon S3 bucket.
-
Get the corresponding message object from an Amazon S3 bucket.
-
Delete the corresponding message object from an Amazon S3 bucket.
Getting Started
-
Sign up for AWS -- Before you begin, you need an AWS account. For more information about creating an AWS account and retrieving your AWS credentials, see [AWS Account and Credentials.
-
Sign up for Amazon SQS -- Go to the Amazon SQS console to sign up for the service.
-
Minimum requirements -- To use the sample application, you'll need python 3 (and above)
-
Further information - Read the API documentation.
Usage
import base64
from pysqs_extended_client.SQSClientExtended import SQSClientExtended
# from string import ascii_letters, digits
# from random import choice
from pysqs_extended_client.config import (AWS_SQS_QUEUE_URL, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION)
if __name__ == '__main__':
sqs = SQSClientExtended(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION, 'tiptapcode-sqs-data')
# _100mb_large_string = ''.join([choice(ascii_letters + digits) for i in range(104857600)])
# message = "_100mb_large_string"
message = None
with open("C:\\DjangoCourse\\Courses\\celery\\introduction-promo.mp4", "rb") as image_file:
encoded_string = base64.b64encode(image_file.read())
message = encoded_string.decode("utf-8")
sqs.send_message(AWS_SQS_QUEUE_URL, message)
res = sqs.receive_message(AWS_SQS_QUEUE_URL)
for message in res:
sqs.delete_message(AWS_SQS_QUEUE_URL, message.get('ReceiptHandle'))
Feedback
- Give feedback here.
- If you'd like to contribute a new feature or bug fix, go ahead submit a pull request.
Metadata
Release files for pysqs-extended-client 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pysqs-extended-client-0.0.1.tar.gz | 7.0 kB | Without provenance | Details for pysqs-extended-client-0.0.1.tar.gz |
Release files / pysqs-extended-client-0.0.1.tar.gz
| Download URL | pysqs-extended-client-0.0.1.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4671baf6970f2dd99f0195144f11c1527fff8741511c5c2bc750dd88cf30c928
|
|
BLAKE2b-256 checksum How to use checksums |
f5b4fc4bdd7470fc8f8ae3581008f91dbe36ec2fbf494fce9291d16e52bcd2e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.1
|
Security for pysqs-extended-client 0.0.1
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.