Skip to main content

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


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 hashes)

Uploaded Source

Built Distribution

simplesqs-0.4.0-py2.py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page