Herbie Adapter for messaging publishing to AWS SNS/SQS
Project description
AWS SNS/SQS Adapter
This Adapter is based on Django and provides a way to publish messages to AWS SNS/SQS.
The default configuration creates a single SNS Topic on which a single SQS Queue subscribes for new messages.
An example SQS consumer is also available.
It is meant to be used with Herbie.
Installation
The package already provides a Django app that just needs to be registered in the main Django app using Herbie.
- Run the following
pip install herbie-aws-sns-sqs-adapter
or add it to your app requirements.txt and update them running:
pip install -r requirements.txt
- Add the adapter App to Django Installed Apllications:
INSTALLED_APPS = [
...
'aws_sns_sqs_adapter.apps.HerbieAwsSnsSqsAdapterConfig',
...
]
- Configure the AWS environment variables:
AWS_ACCESS_KEY_ID="access_key",
AWS_SECRET_ACCESS_KEY="secret_key",
AWS_SQS_SNS_ENDPOINT_URL="sns_sqs_endpoint",
AWS_SQS_SNS_REGION="sns_sqs_region",
- Run command to create the SNS/SQS Topics/Queues according to the schemas available. This command will create 1 SNS Topic and 1 SQS Queue per schema available; the queue will subscribe to the respective created topic.
python manage.py init_sns_sqs
An example Django application using this adapter can be found at the Herbie Sandbox repository.
Developing/Testing
If you would like to further improve this package you'll need to install the dev/test requirmeents.
To to this run in your virtual environment
pip install -e .[tests]
This will install the needed packages (e.g: pytest
) to run/test locally the package
Black Formatter
This package uses Black as a code formatter. You should run it before pushing the code as the CI pipeline checks against it.
black --line-length 119 .
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
File details
Details for the file herbie-aws-sns-sqs-adapter-1.0b1.tar.gz
.
File metadata
- Download URL: herbie-aws-sns-sqs-adapter-1.0b1.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cb28441ac8f2d25b53e108cfbfc276ad7f3e6dc13597e73399b9226a464281d |
|
MD5 | 83bd67c4c66ff4c855d42c716f9b576e |
|
BLAKE2b-256 | 72e722b109954a5978b982691f5934d6f897ceda9af1b4c7d4b194e5610f0228 |
File details
Details for the file herbie_aws_sns_sqs_adapter-1.0b1-py3-none-any.whl
.
File metadata
- Download URL: herbie_aws_sns_sqs_adapter-1.0b1-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e26ae1b73f5846d7f569151924568b15a03a503fc2841d9654d8ab84ca4f85af |
|
MD5 | b504e0d17e0779561a69f16928dd61aa |
|
BLAKE2b-256 | 66e91d76232880f640bfb1e703ec22fb274c93de800d3c3b9e2b14dd5de61c93 |