Python client library for the SMSFlow HTTPS API.
Project description
SMSFlow Python SDK
The SMSFlow Python SDK makes it easy to send SMS messages and check SMS credit balance from backend Python applications, automation scripts, scheduled jobs, CRM integrations, ERP integrations, and operational tooling.
Documentation: https://docs.smsflow.co.za/
Install
Package publishing is not enabled yet. During development, install locally:
pip install smsflow
Configuration
Store credentials in environment variables or your platform's secret manager.
export SMSFLOW_CLIENT_ID="YOUR_CLIENT_ID"
export SMSFLOW_CLIENT_SECRET="YOUR_CLIENT_SECRET"
Do not put SMSFlow Client Secrets in source code, logs, notebooks, screenshots, or public issues.
Usage
import os
from smsflow import SmsFlowClient
client = SmsFlowClient(
client_id=os.environ["SMSFLOW_CLIENT_ID"],
client_secret=os.environ["SMSFLOW_CLIENT_SECRET"],
)
response = client.send_sms(
campaign_name="Python SDK example",
messages=[
{
"destination": "27000000000",
"content": "Your SMSFlow Python test message was sent successfully.",
}
],
)
print(response["sendResponse"]["eventId"])
Features
- Get and cache SMSFlow login tokens.
- Send one or more SMS messages.
- Schedule SMS messages using UTC delivery time.
- Respect opt-out checks by default.
- Check account balance.
- Raise structured exceptions when the API returns an error.
Local test send
This command sends a real SMS and may consume test credits:
export SMSFLOW_CLIENT_ID="YOUR_CLIENT_ID"
export SMSFLOW_CLIENT_SECRET="YOUR_CLIENT_SECRET"
export SMSFLOW_DESTINATION="27000000000"
PYTHONPATH=src python examples/send_sms.py
Security
Never commit real credentials. Use environment variables or a secret manager.
License
MIT
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
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 smsflow-0.1.0.tar.gz.
File metadata
- Download URL: smsflow-0.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee99eba7af03247264489f4c03fd4927cbee3206add138b4ea335a748d2b9b3c
|
|
| MD5 |
09d4451829f64543c6738516f233cc3e
|
|
| BLAKE2b-256 |
5bbce98e9492e300887acb27122e88486a0af328a0f82d510bcef7631886b7a4
|
Provenance
The following attestation bundles were made for smsflow-0.1.0.tar.gz:
Publisher:
publish.yml on SMSFlow-ZA/smsflow-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
smsflow-0.1.0.tar.gz -
Subject digest:
ee99eba7af03247264489f4c03fd4927cbee3206add138b4ea335a748d2b9b3c - Sigstore transparency entry: 1848830938
- Sigstore integration time:
-
Permalink:
SMSFlow-ZA/smsflow-python@1277fc116bdd597c5a6375f4c2717ff138bb7c19 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/SMSFlow-ZA
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1277fc116bdd597c5a6375f4c2717ff138bb7c19 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file smsflow-0.1.0-py3-none-any.whl.
File metadata
- Download URL: smsflow-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 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 |
b73569009cf6027ec656058db1f594eba779d19f57f06efb3feeb4ed781c4dd4
|
|
| MD5 |
dc527a7a291e53c19d0c86c5b9605987
|
|
| BLAKE2b-256 |
45c515a437fae70a8d1a0cf0105e9a9b02a7af916eed878715d0c7c29db66116
|
Provenance
The following attestation bundles were made for smsflow-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on SMSFlow-ZA/smsflow-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
smsflow-0.1.0-py3-none-any.whl -
Subject digest:
b73569009cf6027ec656058db1f594eba779d19f57f06efb3feeb4ed781c4dd4 - Sigstore transparency entry: 1848831100
- Sigstore integration time:
-
Permalink:
SMSFlow-ZA/smsflow-python@1277fc116bdd597c5a6375f4c2717ff138bb7c19 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/SMSFlow-ZA
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1277fc116bdd597c5a6375f4c2717ff138bb7c19 -
Trigger Event:
workflow_dispatch
-
Statement type: