deywuro
Unofficial Python client for the Deywuro (Npontu) SMS gateway.
Sends SMS to Ghanaian phone numbers via Deywuro's /api/sms endpoint.
Not affiliated with Npontu Technologies.
Install
pip install deywuro
# For the async client:
pip install deywuro[async]
Quickstart (sync)
from deywuro import DeywuroClient
client = DeywuroClient(
username="your-username", password="your-password", source="MyApp"
)
result = client.send("233266789453", "Hello there")
print(result.code, result.message)
Or build from environment variables (DEYWURO_USERNAME, DEYWURO_PASSWORD, DEYWURO_SOURCE):
client = DeywuroClient.from_env()
client.send(["233266789453", "0201234567"], "Hello there")
Quickstart (async)
import asyncio
from deywuro import AsyncDeywuroClient
async def main():
client = AsyncDeywuroClient.from_env()
result = await client.send("233266789453", "Hello there")
print(result.code, result.message)
await client.aclose()
asyncio.run(main())
CLI
export DEYWURO_USERNAME=your-username
export DEYWURO_PASSWORD=your-password
export DEYWURO_SOURCE=MyApp
deywuro send --to 233266789453 --message "Hello there"
Error handling
All API failures raise a typed exception (subclass of DeywuroError):
| Code | Exception |
|---|---|
| 401 | InvalidCredentialsError |
| 402 | MissingFieldsError |
| 403 | InsufficientBalanceError |
| 404 | NotRoutableError |
| 500 | DeywuroServerError |
| n/a | DeywuroRequestError (network/transport failure) |
| n/a | InvalidPhoneNumberError (invalid destination number) |
from deywuro import DeywuroClient, DeywuroError
client = DeywuroClient.from_env()
try:
client.send("233266789453", "Hello there")
except DeywuroError as e:
print(f"Send failed ({e.code}): {e.message}")
Phone number handling
Destinations are validated and normalized to Deywuro's required 233XXXXXXXXX
format by default. Accepted input formats: +233266789453, 233266789453,
0266789453. Pass validate=False to send() to skip this.
Scope
Only the send-SMS endpoint is implemented — it's the only endpoint documented in Deywuro's public API reference. No balance-check or delivery-status API is currently published by Npontu.
License
MIT
Release files for deywuro 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| deywuro-0.1.0.tar.gz | 7.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| deywuro-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.3 kB
Release files / deywuro-0.1.0.tar.gz
| Download URL | deywuro-0.1.0.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
579a992e70221138aefba370fcfddf00d14551284d0ca964c9ac0a5206533379
|
|
BLAKE2b-256 checksum How to use checksums |
9c8aff738d5dbeaa057a458c497a8af1a204b28506b7b62568b61f3c260941c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / deywuro-0.1.0-py3-none-any.whl
| Download URL | deywuro-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd326fc92cc60de5a95ba6fbe0dbb0e287736cdedd34615f38c0013b66466894
|
|
BLAKE2b-256 checksum How to use checksums |
aca6d98d83a3ad6250dc549eb91dcc1d10964c3a5698a9a5bde83838ef923934
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|