skillfed

africastalking

Official Africa's Talking Python SDK

africastalking v2.0.3 97.2K downloads/30d#13,163 on PyPI158
Permissive license MIT Active released

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 africastalking

uv

uv add africastalking

poetry

poetry add africastalking

Installing 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

africa's talking sdk pythonsms api africavoice calls africaairtime delivery apiwhatsapp messaging africamobile data apiafrican telecom sdk
telecom-apisms-gatewayafrica

More Internet packages