--- id: pywa version: "4.4.0" license: MIT license_treatment: permissive maintenance: active --- # pywa — 🚀 Build WhatsApp Bots in Python • Fast, Effortless, Powerful License: permissive · Maintenance: active · Downloads: 209.7K/mo ## What it is and what it does PyWa is a comprehensive, fully-typed Python framework for the WhatsApp Cloud API that abstracts away the complexity of direct API calls. It provides decorators and type-safe handlers for receiving and responding to messages, managing templates, building interactive flows, and handling call events. The framework supports both synchronous and asynchronous code paths, integrates with FastAPI and Flask, and includes a built-in webhook server for local development and production deployment. The package is designed to let developers focus on bot logic rather than API plumbing. It handles message routing through composable filters, supports rich message types (text, images, documents, buttons, lists), provides inline conversation listeners for natural multi-turn flows, and includes CLI scaffolding tools. With full type hints and static analysis support, it catches errors early and enables IDE autocomplete throughout. Use it for: - Build a customer support chatbot that receives messages, routes them by intent, and sends templated responses or escalates to human agents. - Create an order-taking bot that collects customer details through interactive flows, manages order templates, and sends status updates. - Implement OTP verification or two-factor authentication flows that wait for user input and validate responses inline. - Develop a notification service that sends templated messages to users based on business events (order shipped, appointment reminder). - Build a WhatsApp Flows experience for newsletter signup, surveys, or multi-step onboarding entirely in Python without manual JSON. - Integrate WhatsApp messaging into an existing FastAPI or Flask application to handle incoming webhooks and send outbound messages. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. PyWa is a fully-typed Python framework for building WhatsApp bots using the WhatsApp Cloud API, handling message sending, webhook reception, interactive flows, templates, and call events. Yes. PyWa is actively maintained, has no known vulnerabilities, low install friction, and is licensed permissively under MIT. It's suitable for production use (Development Status 5) and covers a complete feature set for WhatsApp bot development. Install it if you need to build WhatsApp bots or integrate WhatsApp messaging into a Python application. ## Install pip install pywa uv add pywa poetry add pywa ## Installing pywa Before you install: Low install friction with a single runtime dependency (httpx). Actively maintained with a recent release; last commit 2026-08-12 and 578 repository stars indicate steady development. License in practice: MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects with minimal obligations. Quickstart: pip install pywa from pywa import WhatsApp, filters, types wa = WhatsApp( phone_id="1234567890", token="EAA...", app_id=1234567890, app_secret="secret", callback_url="https://your-domain.com", verify_token="token", ) @wa.on_message(filters.text) def echo(_: WhatsApp, msg: types.Message): msg.reply(f"You said: {msg.text}") # Run with: pywa dev Requires Python 3.10 or later; WhatsApp Cloud API credentials (phone_id, token, app_id, app_secret) and a publicly accessible callback URL for webhook reception. Verify before relying: - Whether the async variant (pywa_async) is included in the base package or requires separate installation. - Whether CLI tools (pywa dev, pywa run, pywa new) are available in the base installation or require optional extras. - Performance characteristics and rate-limit handling for high-volume message scenarios. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 209.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags whatsapp bot framework python, whatsapp cloud api client, whatsapp messaging automation, whatsapp webhook handler, build whatsapp chatbots, whatsapp flows and templates, whatsapp business api python, whatsapp-api, chatbot-framework, async-support [View on SkillFed](https://skillfed.io/packages/pywa) · [View on PyPI](https://pypi.org/project/pywa/)