All SDKs
Py

Python SDK

Official SendAfrica Python client

OfficialProduction ReadyOpen Source · MITv1.0.1
GitHub Repository
SendAfrica/SendAfrica-python-sdk
v1.0.1

Maintained by the SendAfrica core team. PRs welcome — see the contributing guide.

Installation

Requires Python 3.9+

$pip install sendafrica

Quick Start

Send your first SMS in under a minute.

quickstart.python
from sendafrica import SendAfrica

client = SendAfrica(api_key="SA-xxxxx")

result = client.sms.send(
    to="0712345678",
    message="Welcome to SendAfrica",
)

print(result.message_id, result.status, result.credits_used)

Features

SMS Sending
Bulk Sending
Delivery Tracking
Webhook Signatures
Async / Await
Typed Errors
Idempotent Retries
Sandbox Mode
Sender ID Mgmt

Documentation

The Python SDK wraps the SendAfrica REST API in idiomatic Python — typed request and response objects, retry-with-backoff on transient network errors, and helpers for webhook signature verification and idempotent retries. Every method on the SDK maps 1:1 to an endpoint documented in the API reference.
GitHub Repository
SendAfrica/SendAfrica-python-sdk
v1.0.1

Maintained by the SendAfrica core team. PRs welcome — see the contributing guide.