qoo

A simple library for interacting with Amazon SQS.

Popularity
0.5
Declining
Activity
0.0
Stable
3
1
1

Description

qoo is a very simple Amazon SQS client, written in Python. It aims to be much more straight-forward to use than boto3, and specializes only in Amazon SQS, ignoring the rest of the AWS ecosystem.

Programming language: Python
License: MIT License
Latest version: v0.0.4

qoo alternatives and similar packages

Based on the "Queue" category.
Alternatively, view qoo alternatives based on common mentions on social networks and blogs.

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.

Do you think we are missing an alternative of qoo or a related project?

Add another 'Queue' Package

README

image PyPI version Code style: black Python 3.5+ supported Documentation style: archives

qoo is a very simple Amazon SQS client, written in Python. It aims to be much more straight-forward to use than boto3, and specializes only in Amazon SQS, ignoring the rest of the AWS ecosystem.

Features

  • Easier interaction with SQS queues
  • Automatic support for AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_DEFAULT_REGION environment variables.
  • automatic useful message/job metadata

Usage

Installation

pip install qoo

Basic Usage

import qoo
# list SQS queue names
qoo.list_queues()
# get an existing queue
queue = qoo.get("$QUEUE_NAME")
# or create a queue
queue = qoo.create("$QUEUE_NAME")
# send a job, pass info/keys as kwargs
queue.send(info="foo", user_id="test_user") # etc.
# get an approximate count of messages in the queue
len(queue) # approximate total messages
queue.approx_not_visible # approximate number of message in the visibility timeout
# get a job
job = queue.receive(wait_time=1)
job.elapsed # time between sending the job and receiving it
job.md5_matches # boolean property to show that the md5 of the job matches what was sent
# and the data from the job is automatically converted into attrs
job.info # the string "foo"
job.user_id # the string "test_user"
# delete the job from the SQS queue
job.delete()

Testing

Tests can be run with tox!

# run tests
tox

Do not miss the trending, packages, news and articles with our weekly report.

Awesome Python is part of the LibHunt network. Terms. Privacy Policy.

(CC)
BY-SA
We recommend Spin The Wheel Of Names for a cryptographically secure random name picker.

AltStyle によって変換されたページ (->オリジナル) /