Skip to main content

django-mimsms: MiMSMS SMS API Integration for Django & Python

PyPI version License: MIT CI Status

Seamlessly integrate MiMSMS.com SMS API into your Django and Python applications. This package provides a robust, type-safe, and asynchronous client for sending SMS, bulk messages, and tracking delivery reports in Bangladesh.

Key Features

  • Strict Type Safety: Fully typed with mypy strict checks and Pydantic v2 validation.
  • Async Support: Efficient non-blocking I/O using httpx.
  • Django Integration: Configuration via standard Django settings.
  • 100% Test Coverage: Comprehensive test suite with deterministic network isolation (respx).
  • Multiple API Support: Single SMS, Bulk SMS (One-to-Many), and Dynamic SMS (DSMS).

Installation

Install the package via pip or uv:

# Using pip
pip install django-mimsms

# Using uv
uv add django-mimsms

Django Integration

1. Add to INSTALLED_APPS

# settings.py
INSTALLED_APPS = [
    ...,
    "django_mimsms",
]

2. Configure Settings

Add your MiMSMS credentials to your settings.py:

# settings.py
MIMSMS_API_KEY = "your_api_key"
MIMSMS_SENDER_ID = "your_sender_id"
MIMSMS_USERNAME = "your_username"

3. Usage

from django_mimsms import send_sms

# Send a simple SMS
response = send_sms(
    to="88017XXXXXXXX",
    message="Hello from Django!",
)

print(response.trxnId)

Plain Python Usage

If you're not using Django, you can use the MiMSMSClient directly:

import asyncio
from django_mimsms import MiMSMSClient

async def main():
    client = MiMSMSClient(
        api_key="your_api_key",
        username="your_username",
        sender_id="your_sender_id"
    )
    
    response = await client.send_sms(
        to="88017XXXXXXXX",
        message="Hello from Python!",
    )
    print(response.trxnId)

if __name__ == "__main__":
    asyncio.run(main())

Advanced Features

Bulk SMS

Send the same message to multiple recipients:

from django_mimsms import send_bulk_sms

send_bulk_sms(
    numbers=["88017XXXXXXXX", "88018XXXXXXXX"],
    message="Bulk message testing",
)

Dynamic SMS

Send different messages to different recipients in one call:

from django_mimsms import send_dynamic_sms

messages = [
    {"to": "88017XXXXXXXX", "message": "Hi Alice!"},
    {"to": "88018XXXXXXXX", "message": "Hi Bob!"},
]

send_dynamic_sms(messages)

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_mimsms-0.1.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_mimsms-0.1.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file django_mimsms-0.1.0.tar.gz.

File metadata

  • Download URL: django_mimsms-0.1.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for django_mimsms-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3d2245a216b3b3227278f33620799f9bf085b5a441ee9619a1da22396d12be07
MD5 cf73b08a9a8b80319ad9a3ffc1e189d9
BLAKE2b-256 7debe6d93dd68e7f1a6d9d52fcabb816f0ae5b714e097b0d5dc1c393abc88c74

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_mimsms-0.1.0.tar.gz:

Publisher: release.yml on sharf-shawon/django-mimsms

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_mimsms-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: django_mimsms-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for django_mimsms-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 493f3cfa8bb65488f6b71680590be365319db085939bd277e45a3c955a978bc0
MD5 58c2200360795332846e33a6b76bfe00
BLAKE2b-256 69776201d96c33e40b99d32e87b561dfcbe876e63556bf6901cd388a48d3eda0

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_mimsms-0.1.0-py3-none-any.whl:

Publisher: release.yml on sharf-shawon/django-mimsms

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page