1.20.2
What's Changed
Update with pip:
pip3 install -U pywa
- [pywa] adding official support for async (limited support for now)
- [server] expose
webhook_challenge_handler
,webhook_update_handler
andget_flow_request_handler
for custom server implementations - [server] improve continue/stop handling
- [client] adding
skip_duplicate_updates
when callbacks take too long to return (~25s), defaults to True - [client,handlers] allow to override
continue_handling
# wa.py
from pywa_async import WhatsApp, types # Import from `pywa_async` instead of `pywa`
import fastapi
fastapi_app = FastAPI()
wa = WhatsApp(..., server=fastapi_app)
@wa.on_message()
async def echo_media(_: WhatsApp, msg: types.Message):
await msg.reply("I'm using PyWa async!")
Run with uvicorn:
uvicorn wa:fastapi_app
Full Changelog: 1.18.1...1.20.2