Django SNS View
A drop in configurable django view that is used to subscribe and process AWS SNS messages.
Installation
pip install django-sns-view
Default Django Settings
SNS_CERT_DOMAIN_REGEX = r"sns.[a-z0-9\-]+.amazonaws.com$" # Regex to match on cert domain
SNS_VERIFY_CERTIFICATE = True # Whether to verify signature against certificate
SNSEndpoint Attributes
message_type_header = 'HTTP_X_AMZ_SNS_MESSAGE_TYPE'
topic_type_header = 'HTTP_X_AMZ_SNS_TOPIC_ARN'
allowed_message_types = ['Notification', 'SubscriptionConfirmation', 'UnsubscribeConfirmation']
cert_domain_settings_key = 'SNS_CERT_DOMAIN_REGEX'
sns_verify_settings_key = 'SNS_VERIFY_CERTIFICATE'
topic_settings_key = '' # If you would like to subscribe this endpoint to only certain topics, create a setting containing a list of topics that are allowed.
Usage
from django_sns_view.views import SNSEndpoint
class MySNSView(SNSEndpoint):
# Can override SNSEndpoint attributes outlined above
def handle_message(self, message, payload):
# Process the message
Release files for django-sns-view 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_sns_view-1.0.1.tar.gz | 11.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_sns_view-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.8 kB
Release files / django_sns_view-1.0.1.tar.gz
| Download URL | django_sns_view-1.0.1.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e965072ed681ebc449f32ddb4b864fc4591179b507818889cf206becd2d19bdd
|
|
BLAKE2b-256 checksum How to use checksums |
4f08659653b2c67db7dc0cc87ca03d3ca634c7224ab329738cbad936dbf6776d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.13.5 Linux/6.11.0-1015-azure
|
Release files / django_sns_view-1.0.1-py3-none-any.whl
| Download URL | django_sns_view-1.0.1-py3-none-any.whl |
|---|---|
| Size | 14.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db70b84597d1f01c287897bb5fbbb976616213b3c6b2e22493856ff0de62ade5
|
|
BLAKE2b-256 checksum How to use checksums |
ea2781d0a389aae6bcf216db22f8a50640e3049367b9eab2a9b2b801811edbdd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.13.5 Linux/6.11.0-1015-azure
|