WhatsApp SDK Python Documentationο
A comprehensive synchronous Python SDK for WhatsApp Business Cloud API, following Metaβs official documentation.
Getting Started
User Guide
API Reference
Development
Featuresο
β 100% Synchronous - Simple, straightforward API without async complexity
π Fully Type-Hinted - Complete type safety with Pydantic models
π Auto-Retry Logic - Built-in retry mechanism for robust API calls
π Webhook Verification - Secure webhook signature validation
π¦ Media Management - Upload, download, and manage media files
π¬ Template Messages - Full template message support
π Interactive Messages - Buttons, lists, and quick replies
π Location Messages - Send and receive location data
π₯ Contact Messages - Share contact cards
β¨ Modern Python - Supports Python 3.8+
Quick Exampleο
from whatsapp_sdk import WhatsAppClient
# Initialize client
client = WhatsAppClient(
phone_number_id="YOUR_PHONE_NUMBER_ID",
access_token="YOUR_ACCESS_TOKEN"
)
# Send a text message
response = client.messages.send_text(
to="+1234567890",
body="Hello from WhatsApp SDK!"
)
print(f"Message sent! ID: {response.messages[0].id}")
Why This SDK?ο
This SDK provides a clean, intuitive interface for the WhatsApp Business API with:
No Async Complexity: Simple synchronous calls, no await/async to manage
Type Safety: Full Pydantic model support for all requests and responses
Developer Friendly: Clear error messages and comprehensive documentation
Production Ready: Built-in retry logic, rate limiting, and error handling
Well Tested: Comprehensive test suite with high coverage
Supportο
GitHub Issues: Report bugs
GitHub Discussions: Ask questions
Documentation: Youβre reading it!
Licenseο
MIT License - see the LICENSE file for details.