Skip to main content

Our internal queue wrapper.

Project description

pillar-queue-wrapper

Pillar's wrapper around AWS SQS

There are 2 options for authentication through this wrapper

  • Explicit: Where the 'aws_access_key' and 'aws_access_secret' are explicitly passed into the queue function
  • Implicit: Where 'None' is passed into the queue function and it trys to get the credetials from the AWS cli Install the aws cli and add the 'aws_access_key' and 'aws_access_secret' to it.

Quickstart/Basic Usage

    q = Queue(
        name="queuename",
        aws_access_key="aws_access_key here",
        aws_access_secret="aws_access_secret here",
        aws_default_region='us-east-1',
    )
    #Note if a queue name ends with .fifo, it is a fifo queue

    q.send_message(message="A test message", message_attributes={}, message_group_id=None, deduplication_id=None)

    #blocking function that will wait for a message to appear
    message = q.wait_for_message(delete_message=True)
    print(message.body)

Testing

  1. Install AWS CLI with pip install awscli, insert your AWS iam Access key ID and Secret access key found in the AWS IAM console

  2. Make two queues in the SQS Tab called testqueue and testqueue.fifo. The queue testqueue.fifo should be of the FIFO type detailed here. These queues will be used to run the tests.

  3. Run 'pytest'

Future Features:

  • Queue creation/destruction
  • Message pooling
  • get,set, and delete functionality to use queues like arrays pythonically

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

pillar-queue-wrapper-0.0.1.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distribution

pillar_queue_wrapper-0.0.1-py3-none-any.whl (6.7 kB view hashes)

Uploaded 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