{"library":"pywa","title":"pywa - Python WhatsApp Bot Framework","description":"Pywa (Python WhatsApp API) is a powerful, fast, and easy-to-use framework for building WhatsApp bots in Python. It wraps the WhatsApp Business API (Cloud API) and provides a clean, event-driven interface for handling messages, callbacks, and sending rich media. Version 3.9.0 requires Python >=3.10. The library follows a monthly release cadence.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install pywa"],"cli":null},"imports":["from pywa import WhatsApp","from pywa.types import Message","from pywa.types import CallbackButton","from pywa.types import CallbackData"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import os\nfrom pywa import WhatsApp\n\nwa = WhatsApp(\n    phone_id=os.environ['PHONE_ID'],\n    token=os.environ['TOKEN'],\n    server='http://localhost:8080',\n    verify_token='my_verify_token'\n)\n\n@wa.on_message()\ndef handle_message(client: WhatsApp, message):\n    client.send_message(to=message.from_user, text=f'You said: {message.text}')\n\nwa.run()","lang":"python","description":"Initialize the WhatsApp client, define a message handler, and start the webhook server.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}