africastalking
Official Africa's Talking Python SDK
What it is and what it does
This is the official Python SDK for Africa's Talking, a telecom platform serving African carriers. It wraps HTTP APIs for sending SMS, making voice calls, distributing airtime, provisioning mobile data, sending WhatsApp messages, and checking SIM swap state. You initialize it once with your account credentials, then access service instances (SMS, Voice, Airtime, etc.) and call methods synchronously or asynchronously with optional callbacks and timeouts.
The SDK is designed for Python 3.8 and later. It depends on requests for HTTP transport, schema for validation, and responses for testing. All major telecom operations—message delivery, call initiation, balance checks—are exposed as straightforward method calls, with support for both blocking and callback-based async patterns.
Use it for:
- Send SMS notifications and alerts to phone numbers across African networks via a single API call
- Distribute mobile airtime or data bundles to customers programmatically with retry and currency handling
- Initiate outbound voice calls and manage call queues for customer support or IVR workflows
- Send WhatsApp messages with text, media, and interactive buttons to customers in regions where WhatsApp is primary
- Check SIM swap state to detect account takeover attempts and enhance security
- Fetch application balance and transaction history for billing and reconciliation
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Python access to Africa's Talking APIs for SMS, voice calls, airtime, mobile data, WhatsApp, and other telecom services across African carriers.
Yes. The SDK is actively maintained, has no known vulnerabilities, installs with low friction, and is the official client for a widely-used African telecom platform. Install it if you need to integrate SMS, voice, airtime, or WhatsApp into an application serving African users. Verify that Africa's Talking's own SLAs and API limits match your production requirements before deploying.
Install
africastalking on PyPI
pip
pip install africastalkinguv
uv add africastalkingpoetry
poetry add africastalkingInstalling africastalking
Before you install
Low install friction with three lightweight runtime dependencies (requests, schema, responses). Active maintenance with a recent release 14 days ago and steady commit activity.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal obligations—suitable for commercial and open-source projects.
Quickstart
pip install africastalking
import africastalking
africastalking.initialize("YOUR_USERNAME", "YOUR_API_KEY")
sms = africastalking.SMS
response = sms.send("Hello!", ["+2547xxxxxx"])
print(response)
Requires Python 3.8 or later; you must obtain a username and API key from https://account.africastalking.com/ before initialization will work.
Verify before relying
- Whether timeout defaults and retry behavior are documented for each service method
- Whether the SDK handles network failures and rate limiting transparently or requires explicit retry logic
- Production readiness and SLA guarantees for the underlying Africa's Talking platform
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — requests, schema, responses |
| Maintenance | actively maintained — 14 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 97,221/month — #13,163 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: africastalking-2.0.3-py3-none-any.whl
Keywords: ussd, voice, sms, mpesa, sender_id, airtime, africastalking, mobile_data, sim_swap, whatsapp
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
plivoA Python SDK for integrating Plivo's voice,…
permissive · top 15,000 on PyPI
ringcentralPython SDK for accessing RingCentral's cloud…
unclear · top 15,000 on PyPI
pywaPyWa is a fully-typed Python framework for…
permissive · top 15,000 on PyPI
azure-communication-smsSends SMS messages through Azure Communication…
permissive · top 15,000 on PyPI
telesignTeleSign SDK provides Python bindings to send…
permissive · top 15,000 on PyPI
vonage-messagesProvides Python message models and client…
permissive · top 15,000 on PyPI
messagebirdA Python client for MessageBird's REST API that…
permissive · top 15,000 on PyPI
vonageVonage provides a unified Python interface to…
permissive · top 15,000 on PyPI
twilioPython client library for the Twilio API that…
permissive · top 5,000 on PyPI
openfoodfactsQuery and manage product data from the Open…
permissive · top 15,000 on PyPI