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-commflexAdd “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
Metadata
Release files for django-commflex 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_commflex-1.0.1.tar.gz | 13.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_commflex-1.0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 21.7 kB
Release files / django_commflex-1.0.1.tar.gz
| Download URL | django_commflex-1.0.1.tar.gz |
|---|---|
| Size | 13.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f7250e6948b2a5ea8e6539c145b7f28c9678f486c8f63a1c58add9aa462efca
|
|
BLAKE2b-256 checksum How to use checksums |
bf65f663d804571ab8145c47848d54769e1975ef438692424aaa7ea8542bdebb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|
Release files / django_commflex-1.0.1-py2.py3-none-any.whl
| Download URL | django_commflex-1.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
8037826bf97ff3537f4124d0c63e0e0a3ce1a87d612d50ea03a73253b9d2161f
|
|
BLAKE2b-256 checksum How to use checksums |
7852b7dd34016df86c020d12c3960e7596fdc0a51ad5caab6c5dbc617c36e06c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|