Skip to content

1.20.2

Compare
Choose a tag to compare
@david-lev david-lev released this 02 Jun 12:24
· 92 commits to master since this release

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 and get_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