Send SMS through your own phone's SIM via API — Django app.
Project description
ownsms
Send SMS through your own phone's SIM card via a simple REST API. ownsms is a Django app that
pairs with an Android device; the device long-polls for outbound messages and dispatches them over
its own SIM — like Eskiz or Play Mobile, but from your number, at your tariff, with no third-party
SMS gateway.
- Documentation: https://ownsms.omadli.uz
- Live API demo: https://sms.omadli.uz/api/v1/docs
- Android sender app: https://github.com/ownsms/ownsms-android
Installation
pip install ownsms
Usage
Add the app to INSTALLED_APPS and include its URLs:
# settings.py
INSTALLED_APPS = [
...
"ownsms",
]
# urls.py
from django.urls import include, path
urlpatterns = [
path("", include("ownsms.urls")),
]
Migrate, then send an SMS with a Bearer API key:
$ python manage.py migrate
POST /api/v1/messages
Authorization: Bearer osk_<your-api-key>
Content-Type: application/json
{"to": "+998901234567", "text": "Hello from ownsms!"}
The paired Android device polls the server, picks up the message, and sends it over the SIM. See the quickstart for the full register → key → send → status flow.
Features
- Single send — immediate or
queued, with per-messagefrom(SIM),ttl,idempotency_key,callback_url, andsend_atscheduling. - Campaigns — one template with
{var}placeholders + a recipients list, fail-fast validation, progress, and pause / resume / cancel. - Delivery lifecycle —
queued → sending → sent → delivered | failed,expired,canceled; at-most-once (a job left uncertain by a crash is failed, never resent). - Webhooks — HMAC-signed, retried delivery on status transitions (off by default).
- Per-SIM pacing — rate limits, jitter, working hours, and daily quota, synced to the device.
- Security — API-key scopes (
send/read), revocation, IP allowlist, and an audit log. - Sandbox —
is_testAPI keys simulate delivery without touching a device. - Django admin — every model registered for management.
Full endpoint reference: Swagger UI at /api/v1/docs, schema at /api/v1/openapi.yaml.
Compatibility
Tested on Python 3.11 – 3.14 and Django 4.2 – 5.2 (Django 4.2 and 5.0 require Python ≤ 3.12). Requires Python 3.11+.
Development
pip install -e ".[dev]"
pytest # tests
ruff check src tests # lint
ruff format src tests # format
tox # full Python × Django matrix
License
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 ownsms-0.3.3.tar.gz.
File metadata
- Download URL: ownsms-0.3.3.tar.gz
- Upload date:
- Size: 34.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d90a1d62352be376ad2fb1bfce123ba2773350f832388400f35971be8ed59cf8
|
|
| MD5 |
f3452ae3a09fb538f43d3527dd372277
|
|
| BLAKE2b-256 |
394b605859a924cc7f0f702607922463bac459ff1e1b98c4a41a4b7a9e59331f
|
Provenance
The following attestation bundles were made for ownsms-0.3.3.tar.gz:
Publisher:
publish.yml on ownsms/django-ownsms
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ownsms-0.3.3.tar.gz -
Subject digest:
d90a1d62352be376ad2fb1bfce123ba2773350f832388400f35971be8ed59cf8 - Sigstore transparency entry: 2101352287
- Sigstore integration time:
-
Permalink:
ownsms/django-ownsms@588eb5031b55cc51f8784be992fa77f1783933e8 -
Branch / Tag:
refs/tags/v0.3.3 - Owner: https://github.com/ownsms
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@588eb5031b55cc51f8784be992fa77f1783933e8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ownsms-0.3.3-py3-none-any.whl.
File metadata
- Download URL: ownsms-0.3.3-py3-none-any.whl
- Upload date:
- Size: 38.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4cae667e2dca6d920cadd2edbebf16936e455349911de965b81ef47cf68c7c3
|
|
| MD5 |
f866682793aa3709723c846b0e84e86d
|
|
| BLAKE2b-256 |
f260f2a47a7fceb3340ac945dd0f48ed4adb4a6f0ff9f9830ebd519578406e61
|
Provenance
The following attestation bundles were made for ownsms-0.3.3-py3-none-any.whl:
Publisher:
publish.yml on ownsms/django-ownsms
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ownsms-0.3.3-py3-none-any.whl -
Subject digest:
f4cae667e2dca6d920cadd2edbebf16936e455349911de965b81ef47cf68c7c3 - Sigstore transparency entry: 2101353118
- Sigstore integration time:
-
Permalink:
ownsms/django-ownsms@588eb5031b55cc51f8784be992fa77f1783933e8 -
Branch / Tag:
refs/tags/v0.3.3 - Owner: https://github.com/ownsms
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@588eb5031b55cc51f8784be992fa77f1783933e8 -
Trigger Event:
release
-
Statement type: