# Notify Africa Python SMS SDK
A Python SDK for integrating with Notify Africa SMS service, allowing developers to easily send SMS messages through their Python applications. This SDK matches the Node.js SDK structure for consistency across platforms.
## Features
- **Send Single SMS** - Send SMS to individual recipients
- **Send Batch SMS** - Send SMS to multiple recipients at once
- **Check Message Status** - Track SMS delivery status
- **Developer Friendly** - Type hints, error handling, and comprehensive documentation
- **Node.js Compatible** - Matches the Node.js SDK structure for easy migration
## Installation
```bash
pip install git+
github.com
```
## Quick Start
```python
from notify_africa import NotifyAfrica
# Initialize client
client = NotifyAfrica(
apiToken="your_api_token_here"
)
# Send a single SMS
response = client.send_single_message(
phoneNumber="2556XXXXXXXX",
message="Hello from Notify Africa!",
senderId="164"
)
print(f"Message ID: {response.messageId}")
print(f"Status: {response.status}")
```
## Usage Examples
### Send Single SMS
```python
from notify_africa import NotifyAfrica
client = NotifyAfrica(apiToken="your_api_token")
response = client.send_single_message(
phoneNumber="2556XXXXXXXXX",
message="Hello, this is a test message!",
senderId="164"
)
print(f"Message ID: {response.messageId}")
print(f"Status: {response.status}")
# Output: Message ID: 165102
# Output: Status: PROCESSING
```
### Send Batch SMS
```python
from notify_africa import NotifyAfrica
client = NotifyAfrica(apiToken="your_api_token")
phone_numbers = [
"2556XXXXXXXXXX",
"255XXXXXXXX",
"255XXXXXXXX"
]
response = client.send_batch_messages(
phoneNumbers=phone_numbers,
message="Bulk SMS message to all recipients",
senderId="164"
)
print(f"Message Count: {response.messageCount}")
print(f"Credits Deducted: {response.creditsDeducted}")
print(f"Remaining Balance: {response.remainingBalance}")
```
### Check Message …