Provides flexibility of sending messages across multiple channels
Project description
Django Commflex Library
A flexible and reliable Django library for sending SMS messages through multiple providers with built-in retry capabilities.
Key Features
Multiple SMS provider support (AWS SNS and AIT)
Automatic phone number validation
Configurable retry mechanism with exponential backoff
Quick Start
Install the package:
pip install django-commflex
Add “django-double-commflex” to your INSTALLED_APPS setting:
INSTALLED_APPS = [ ... 'commflex', ]
Add SMS settings to your Django settings:
SMS_SETTINGS = { 'aws': { 'access_key': 'your-access-key', 'secret_access_key': 'your-secret-key', 'region': 'aws-region', 'enabled': True, 'timeout': 30, }, 'ait': { 'username': 'your-username', 'api_key': 'your-api-key', 'sms_url': 'https://api.ait-provider.com/sms', 'sender_id': 'YOUR_SENDER_ID', 'enabled': False, 'timeout': 30, # Optional, defaults to 30 seconds } }
Send an SMS:
from commflex.sms import send_sms send_sms(phone_number, message)
Supported Providers
AWS SNS
Amazon Simple Notification Service integration with support for all regions.
AIT SMS
Africa’s Talking SMS service integration with custom sender ID support.
Testing
Run the test suite:
python -m pytest
For development, install test dependencies:
pip install -e ".[test]"
Documentation
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 django_commflex-1.0.1.tar.gz
.
File metadata
- Download URL: django_commflex-1.0.1.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f7250e6948b2a5ea8e6539c145b7f28c9678f486c8f63a1c58add9aa462efca |
|
MD5 | 8c0fea1503badc9ea4777e1a43f8d07f |
|
BLAKE2b-256 | bf65f663d804571ab8145c47848d54769e1975ef438692424aaa7ea8542bdebb |
File details
Details for the file django_commflex-1.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: django_commflex-1.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8037826bf97ff3537f4124d0c63e0e0a3ce1a87d612d50ea03a73253b9d2161f |
|
MD5 | 321e348395e09c765140d2fcaac78a2d |
|
BLAKE2b-256 | 7852b7dd34016df86c020d12c3960e7596fdc0a51ad5caab6c5dbc617c36e06c |