QueueFetcher makes dealing with SQS queues in Django easier
Project description
QueueFetcher allows you to deal with Amazon SQS queues in an easier manner in Django.
It provides:
run_queue management task to start the task from cli
QueueFetcher class to do the heavy lifting with the pieces seperated out and testable
Getting started
Install queue-fetcher from pip
Add queue_fetcher to INSTALLED_APPLICATIONS
Add to your settings.py:
TEST_SQS = False
QUEUES = {
'Internal Name': 'Name On Amazon'
}
Now build your tasks in your tasks package:
from queue_fetcher.tasks import QueueFetcher class SampleQueueTask(QueueFetcher): queue = 'test' def process_sample(self, msg): raise NotImplementedError('This does nothing.. yet')
QueueFetcher expects messages from SQS to contain a list of events, with each event containg a message_type attribute of something like update_transaction.
This is then dispatched to a function prefixed with process_.
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
Built Distribution
Hashes for queue_fetcher-1.4.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e3659fe30659c43784dcc7bec3b253b55c97509f8fd23981b94bf5c287fe4e4 |
|
MD5 | 69950fb4670e2b3819c57ac1d97382a7 |
|
BLAKE2b-256 | 8e52e78314daa8adee3b91350d446bdefb9ad78183ff58669259184d8999c6c8 |