Skip to main content

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.

Getting a Deywuro account and Sender ID

You need a Deywuro account, an API username/password, and an approved Sender ID before you can send anything with this library. Here's how to get all three, from scratch:

1. Create an account

  1. Go to deywuro.com/login and click Create Account.
  2. Fill in the registration form:
    • Register AsClient (this is what you want, unless you're reselling Deywuro's service to your own customers, in which case pick Reseller)
    • Name of Company/Individual — your business name, or your own name if you're signing up individually
    • Nature of Business — pick the closest match from the dropdown
    • Business Location
    • Preferred Username — 6-30 characters, letters/numbers/underscore/ hyphen. This becomes part of your API login, so pick something you're fine hard-coding into a .env file
    • Contact Person Name / Email / Phone Number — used for account verification and support
    • Optional: company phone number, mobile money number, business logo, business registration document, an LOA (Letter of Authorization), and an ID for the contact person. You can skip all of these at signup — the LOA in particular is only needed later, for Sender ID approval (see below).
  3. Submit the form. Npontu reviews new accounts manually, so expect a wait before you can log in.

2. Get your API credentials

Once your account is approved, log in at deywuro.com/login. Your API username and password are the credentials Npontu provisions for your account (the username you chose at signup is usually what you'll use — confirm on your dashboard, or ask support if you can't find them). These are the DEYWURO_USERNAME / DEYWURO_PASSWORD values this library expects.

Keep these secret — treat them like any other API credential. Don't commit them to source control; use environment variables or a .env file that's git-ignored (see Quickstart below).

3. Request a Sender ID

The source parameter (DEYWURO_SOURCE for this library) is your Sender ID — the name recipients see as the SMS sender instead of a phone number (e.g. "MyApp" instead of a shortcode). Requirements:

  • Up to 11 characters, alphanumeric.
  • Must be approved by Npontu before messages sent with it will deliver reliably — an unapproved or unfamiliar sender ID risks being blocked by mobile network operators.
  • To request one, submit an LOA (Letter of Authorization) — from your dashboard after logging in, or by emailing support@npontu.com if you don't see a self-service option. The LOA is essentially your business formally authorizing the use of that Sender ID.
  • Approval isn't instant — ask support for current turnaround time when you submit.

While waiting for approval, some providers offer a shared/default test Sender ID for development — ask support if one's available so you can test integration before your own Sender ID clears.

4. Put it all together

# .env (never commit this file)
DEYWURO_USERNAME=your-approved-username
DEYWURO_PASSWORD=your-account-password
DEYWURO_SOURCE=YourSenderID

Note: Deywuro's public materials don't fully document the post-login dashboard flow for credentials/Sender ID requests. If anything above doesn't match what you see after logging in, the fastest path is support@npontu.com — they provision accounts manually and can point you to the exact button/section.

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.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deywuro 0.1.1
File Size Uploaded
deywuro-0.1.1.tar.gz 9.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for deywuro 0.1.1
File Interpreter ABI Platform
deywuro-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 20.6 kB

Release files / deywuro-0.1.1.tar.gz

Download URL deywuro-0.1.1.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
457b2a78074eb57fc78d96919095620281232ba3ba5a618e2e48cf37305174cc
BLAKE2b-256 checksum
How to use checksums
923bf0f98208a34d9d7eb9628a83e07ba08edc9ef46cc853c68294bda5ed9ae5
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.1-py3-none-any.whl

Download URL deywuro-0.1.1-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20c32123116a7cd3e5e062b94855fd09652c39f28bf0ffecb49f45975df89140
BLAKE2b-256 checksum
How to use checksums
e373520289d3b3088db7870617175d16e4042f10cbf8f7b51b0c3162d275c5e5
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 history Release notifications | RSS feed

0.1.2

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page