WPP_Whatsapp is a powerful Python library built on top of WPPConnect, bringing WhatsApp Web automation to Python developers.
π‘ Looking for something else? Check out neonize - A powerful Python library built on top of Whatsmeow, enabling seamless WhatsApp automation with enterprise-grade performance.
π Looking for documentation? Check out our Complete Documentation
| Feature | Status |
|---|---|
| Automatic QR Refresh | β |
| Send text, image, video, audio, documents | β |
| Get contacts, chats, groups, group members | β |
| Send contacts, stickers, locations | β |
| Multiple Sessions Support | β |
| Forward Messages | β |
| Receive Messages with Callbacks | β |
| Group Management | β |
| Business Features | β |
| Rate Limiting | β |
Using pip:
pip install wpp-whatsappUsing uv (Recommended):
uv add wpp-whatsappfrom WPP_Whatsapp import Create
# Create and start client
creator = Create(session="mybot")
client = creator.start()
# Define message handler
def on_message(msg):
if msg.get('body') and not msg.get('isGroupMsg'):
# Auto-reply
client.sendText(msg.get('from'), "Thanks for your message! π€")
# Register handler
client.on_message(on_message)
# Start bot
print("Bot started! Scan QR code...")
client.start()That's it! Your WhatsApp bot is now running! π
We've created comprehensive documentation to help you:
- π Quick Start Guide - Get started in 5 minutes
- π API Reference - Complete method documentation
- π§ Troubleshooting - Common issues and solutions
- π‘ Examples - Code examples for every use case
- β‘ Advanced Examples - Advanced patterns and features
Start here: Complete Documentation Index
from WPP_Whatsapp import Create
creator = Create(session="test")
client = creator.start()
# Send text
client.sendText("1234567890@c.us", "Hello!")
# Send image
client.sendImage("1234567890@c.us", "image.jpg", "Beautiful sunset!")
# Send file
client.sendFile("1234567890@c.us", "document.pdf", "Here's the document")
# Send location
client.sendLocation("1234567890@c.us", 40.7128, -74.0060, title="New York")from WPP_Whatsapp import Create
creator = Create(session="test")
client = creator.start()
def on_message(message):
# Ignore group messages
if message.get('isGroupMsg'):
return
# Process message
chat_id = message.get('from')
text = message.get('body')
if 'hello' in text.lower():
client.sendText(chat_id, "Hi there! π")
client.on_message(on_message)
client.start()from WPP_Whatsapp import Create
creator = Create(session="test")
client = creator.start()
# Create group
group = client.createGroup("My Group", ["123@c.us", "456@c.us"])
# Add participant
client.addParticipant(group['gid'], "789@c.us")
# Send message to group
client.sendText(group['gid'], "Hello everyone!")- π Basic Examples - Core functionality
- β‘ Advanced Examples - Complex patterns
- ποΈ Archive - Additional examples
WPP_Whatsapp can be used for:
- π€ Chatbots - Customer service automation
- π’ Broadcasting - Safe bulk messaging with rate limiting
- π₯ Group Management - Automated group administration
- π Analytics - Message tracking and statistics
- π Integration - Connect WhatsApp with other services
- π± Auto-replies - Intelligent response systems
Always use rate limiting for bulk operations to avoid bans:
import time
contacts = ["123@c.us", "456@c.us"]
for contact in contacts:
client.sendText(contact, "Hello")
time.sleep(2) # 2 second delay- β Handle errors gracefully
- β Use unique session names
- β Implement reconnection logic
- β Test with small groups first
- β Respect WhatsApp's terms of service
- π Complete Documentation
- π Quick Start Guide
- π§ Troubleshooting
- π¬ GitHub Discussions
- π Report Issues
- π‘ Feature Requests
WPP_Whatsapp/
βββ WPP_Whatsapp/ # Main package
βββ docs/ # Documentation
βββ examples/ # Basic examples
βββ scripts/ # Advanced examples
βββ archive/ # Additional examples
βββ tests/ # Test suite
βββ README.md # This file
βββ pyproject.toml # Project configuration
βββ CHANGELOG.md # Version history
We welcome contributions! Here's how you can help:
- π Improve documentation
- π Report bugs
- π‘ Suggest features
- π§ Submit pull requests
- π Add examples
See Contributing Guide for details.
This project is licensed under the MIT License.
- Built on top of WPPConnect
- Powered by Playwright
Made with β€οΈ by Ammar Alkotb
Happy Coding! π