A library for sending and receiving AWS SQS messages.
Project description
Simple SQS
Provides a simple class-based wrapper around AWS SQS.
Quick start
Install with pip:
pip install simplesqs
Creating a queue:
from simplesqs.message import MessagingHandler
queue_name = "test_queue_simplesqs"
handler = MessagingHandler(queue_name=queue_name)
handler.create_queue()
Sending a message:
from simplesqs.message import MessagingHandler
queue_name = "test_queue_simplesqs"
handler = MessagingHandler(queue_name=queue_name)
handler.send_message(message_type='test', message={'message': f"Hello world!"})
Reading messages:
from simplesqs.message import MessagingHandler
queue_name = "test_queue_simplesqs"
handler = MessagingHandler(queue_name=queue_name)
while True:
messages = handler.batch_receive_messages(message_type='test')
if len(messages) == 0:
break
for message in messages:
print(message.message)
message.delete()
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
simplesqs-0.4.0.tar.gz
(4.5 kB
view details)
Built Distribution
File details
Details for the file simplesqs-0.4.0.tar.gz
.
File metadata
- Download URL: simplesqs-0.4.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d29f5d9400bc1ef88ca69e3975a500bb73c07d46e64617578e0b59a98c4d8d2 |
|
MD5 | a1cabffd93913d9a3b6bd04bf25f630b |
|
BLAKE2b-256 | 147bfb834776605a4bf67f4c00b31f7a796256dbb9c84bfb80d236e21b3fcb62 |
File details
Details for the file simplesqs-0.4.0-py2.py3-none-any.whl
.
File metadata
- Download URL: simplesqs-0.4.0-py2.py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fa8d5ee09b75310253637b2c6e2490cfa926b0683b855b0548a18b468eb8390 |
|
MD5 | d582d1bf012119e2c1bb8b13aa2d46e6 |
|
BLAKE2b-256 | f79aa09b8451a22c400f245b7f138b1c9afaafe4148b210d145069b25286f729 |