Skip to main content

Django Sms is a Python package that simplifies the process of sending SMS messages using various SMS service providers. It offers a modular and user-friendly API for sending messages and tracking statistics related to the messages sent.

Quick start

  1. Add “smsapp” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...,
        "smsapp",
    ]
  2. Include the apps URLconf in your project urls.py like this:

    path("smsadmin/", include("smsapp.urls")),
  3. Run python manage.py migrate to create the polls models.

  4. Use the provided API to send SMS messages. The package abstracts away the complexities of interacting with different provider APIs:

    from .settings import AFRICAS_USERNAME, AFRICAS_API_KEY, SENDER_ID, KMI_ACCESS_KEY, KMI_SECRET_KEY, GEEZ_TOKEN, JAK_USERNAME, JAK_PASSWORD
    
    from smsapp.providers.kmi_sms import KmiSms
    from smsapp.providers.africastalking_sms import AfricasTalkingSms
    from smsapp.providers.jak_sms import JakSms
    from smsapp.providers.geez_sms import GeezSms
    
    from smsapp.utils import send_and_save_sms
    
    providers = [
        KmiSms(access_key=KMI_ACCESS_KEY, secret_key=KMI_SECRET_KEY, sender_id=SENDER_ID, callback_url="https://ad04-196-188-55-159.ngrok-free.app/sms_callback"),
        AfricasTalkingSms(username=AFRICAS_USERNAME, api_key=AFRICAS_API_KEY, sender_id=SENDER_ID),
        JakSms(username=JAK_USERNAME, password=JAK_PASSWORD),
        GeezSms(GEEZ_TOKEN),
    ]
    
    def send_sms(phone, message):
        send_and_save_sms(phone, message, providers)
    # Then you can use this api to send your sms messages
    ``
  1. Start the development server and visit http://127.0.0.1:8000/smsadmin/ to see an sms statistics dashboard.

Metadata

Release files for django-sms-package 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-sms-package 1.0
File Size Uploaded
django-sms-package-1.0.tar.gz 11.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-sms-package 1.0
File Interpreter ABI Platform
django_sms_package-1.0-py3-none-any.whl Python 3 none any Details

Total release size: 30.0 kB

Release files / django-sms-package-1.0.tar.gz

Download URL django-sms-package-1.0.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d6e054ccb5da117e314f00b89b67f3ece0b5baa515793c7b8551ecb1d8cc55e3
BLAKE2b-256 checksum
How to use checksums
21358b01c32c45db3bd8c78faa0b3a822312d6e7e8aeeeb3b58eb8da5501aecc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / django_sms_package-1.0-py3-none-any.whl

Download URL django_sms_package-1.0-py3-none-any.whl
Size 18.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
67431bb11ebebca054797f2afa3fd09d090c435dcc67c3423baa8a75572dd123
BLAKE2b-256 checksum
How to use checksums
2990e41c64a2e955e8effaec00e5919d3f389a5a79f1e2a6ec4b633a0ef31518
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files

0.6

2 release files

0.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page