kalourmade-sailup
Python SDK for the Sailup SMS gateway.
Install
pip install kalourmade-sailup
Requires Python 3.9+. Single dependency: httpx.
Quickstart
import os
from kalourmade_sailup import SailupClient
client = SailupClient(os.environ["SAILUP_API_KEY"])
message = client.sms.send(
from_="MyBrand",
to=["233241234567"],
body="Hello from Sailup",
)
Error handling
from kalourmade_sailup.exceptions import (
AuthenticationError, ValidationError, RateLimitError, ApiError, NetworkError,
)
try:
client.sms.send(from_="MyBrand", to=["233241234567"], body="Hi")
except AuthenticationError:
... # invalid/missing API key
except ValidationError:
... # bad request payload
except RateLimitError:
... # back off and retry
except ApiError as e:
... # other API error — e.status_code, e.raw_body
except NetworkError:
... # couldn't reach Sailup
Verifying webhooks
from kalourmade_sailup import Webhooks
from kalourmade_sailup.exceptions import InvalidSignatureError
try:
event = Webhooks.verify(raw_body, request.headers, os.environ["SAILUP_WEBHOOK_SECRET"])
except InvalidSignatureError:
return Response(status=400)
Full documentation, runnable examples, and the PHP/Node SDKs: github.com/kalourmade/sailup-sdk.
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 kalourmade_sailup-0.1.1.tar.gz.
File metadata
- Download URL: kalourmade_sailup-0.1.1.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8dee18072e3570c664d29dcd623bbb7a29ddd7a8e672986cf8e32d1fd4827b3f
|
|
| MD5 |
ffe290882368a2f786fd32aaf5b9007a
|
|
| BLAKE2b-256 |
5dfc348ae8c6be63922dafb27b9c291f94b4bad0d610e06c94f64aa1b88b670b
|
File details
Details for the file kalourmade_sailup-0.1.1-py3-none-any.whl.
File metadata
- Download URL: kalourmade_sailup-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09ca78f96a10a4195a6bc1b6d6c94191e5654d1179aceb1c8dd2f7c6c70ff2e4
|
|
| MD5 |
9bf981990768eb6a5203a15c1664de68
|
|
| BLAKE2b-256 |
f331caa03e33bfc14ae68a9c7fce88d8efac80cc63cfff6602cc3b06fc8d6fa6
|