A Django view that can be subscribed to Amazon SNS
Project description
django-sns-view2
A drop in configurable django view that is used to subscribe and process AWS SNS messages.
This repo is a fork of the (now unmaintained) django-sns-view package (see also deep-c/django-sns-view on GitHub).
Installation
pip install django-sns-view2
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 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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_sns_view2-0.3.2.tar.gz.
File metadata
- Download URL: django_sns_view2-0.3.2.tar.gz
- Upload date:
- Size: 48.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03f85dfd017e71f3c6070b96cfb1c408640fda47cbf58cb6128bc7092d859bbf
|
|
| MD5 |
1b524bf4f0f31b84ce9b5fff7aa0071f
|
|
| BLAKE2b-256 |
689bacb35f1979a6202f6bf442eab31784b0296137e60543606de7fc3d1b42f0
|
Provenance
The following attestation bundles were made for django_sns_view2-0.3.2.tar.gz:
Publisher:
.gitlab-ci.yml on thelabnyc/django-sns-view
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_sns_view2-0.3.2.tar.gz -
Subject digest:
03f85dfd017e71f3c6070b96cfb1c408640fda47cbf58cb6128bc7092d859bbf - Sigstore transparency entry: 466380917
- Sigstore integration time:
-
Permalink:
thelabnyc/django-sns-view@bf30273512f4bb3631c1b6ea17453e31555d2227 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://gitlab.com/thelabnyc
-
Access:
public
-
Token Issuer:
https://gitlab.com -
Runner Environment:
gitlab-hosted -
Publication workflow:
.gitlab-ci.yml@bf30273512f4bb3631c1b6ea17453e31555d2227 -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_sns_view2-0.3.2-py3-none-any.whl.
File metadata
- Download URL: django_sns_view2-0.3.2-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2853a42ff63252fd7c32522b880f86d91fc58a565291dea132daa76b7ef2ce1c
|
|
| MD5 |
9b1c77c162ce0f8e4299cb60817da14a
|
|
| BLAKE2b-256 |
984d9706efac68e06b74aa9119a0573836cdcecc43d3d0c5f08c21e8c00fc460
|
Provenance
The following attestation bundles were made for django_sns_view2-0.3.2-py3-none-any.whl:
Publisher:
.gitlab-ci.yml on thelabnyc/django-sns-view
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_sns_view2-0.3.2-py3-none-any.whl -
Subject digest:
2853a42ff63252fd7c32522b880f86d91fc58a565291dea132daa76b7ef2ce1c - Sigstore transparency entry: 466380894
- Sigstore integration time:
-
Permalink:
thelabnyc/django-sns-view@bf30273512f4bb3631c1b6ea17453e31555d2227 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://gitlab.com/thelabnyc
-
Access:
public
-
Token Issuer:
https://gitlab.com -
Runner Environment:
gitlab-hosted -
Publication workflow:
.gitlab-ci.yml@bf30273512f4bb3631c1b6ea17453e31555d2227 -
Trigger Event:
push
-
Statement type: