NOTE: pywa follows the semver versioning standard.
- [client] allowing to specify the callback url scope
- [client] expose methods to override callback url in waba and phone scopes
- [flows] typing
DataSource
to acceptRef
s
- [flows] adding
ScreenDataUpdate
to use inUpdateDataAction
- [flows] using math operators between math objs
- [flows] renaming
ActionNext
toNext
andActionNextType
toNextType
- [flows] adding
CalendarPicker
component - [flows] allow string concatenation with refs
- [flows] adding support for math expressions
- [flows] allowing to use condition in
visible
- [flows] new action: open url
- [flows] new action: update data
- [flows]
init_value
available outside form - [flows] allow to use
screen/ref
as shortcut for.ref_in(screen)
- [flows] separating
Action
and addingon_unselect_action
- [client] fix
send_template
return typeSentMessage
- [client] fix
reply_to_message
- [client] override
_flow_req_cls
- [handlers] descriptive repr for
Handler
- [server] rely on update hash instead of update id to avid duplicate updates
- [server] fix skip update in process (async)
BREAKING CHANGES!! READ THE MIGRATION GUIDE
- [listeners]: Listeners are a new way to handle incoming user updates (messages, callbacks, etc.). They are more flexible, faster, and easier to use than handlers.
- [sent_message]: The
SentMessage
object returned bysend_message
,send_image
, etc., contains the message ID and allows to act on the sent message with methods likereply_x
,wait_for_x
etc. - [filters]: Filters are now objects that can be combined using logical operators. They are more powerful and flexible than the previous filter system.
- [handlers] allow to register callbacks without WhatsApp instance
- [flows] allow pythonic conditionals in
If
component - [flows]: A new method
FlowCompletion.get_media(types.Image, key="img")
allows you to construct a media object and perform actions like.download()
on it. - [flows]: Decrypt media directly from FlowRequest using
.decrypt_media(key, index)
. - [flows] rename
.data_key
and.from_ref
to.ref
- [client]: The client can run without a token but won’t allow API operations (only webhook listening).
- [callback] allow to override callback data id
- [utils] bump graph-api version to
21.0
- [flows] adding support of
RichText
- [flows] adding support of
markdown
inTextBody
andTextCaption
- [flows] adding
sensitive
attr to Screen, allowing to hide specific fields from the response summary - [client] adding
reply_to_message
arg tosend_location
,request_location
,send_sticker
, andsend_audio
- [message] adding
reply_location_request
- [handlers] adding priority
- [client] adding QR methods (create update get and delete)
- [client] adding
get_flow_metrics
method - [flows] adding to
DataSource
support for images/colors - [flows] support
datetime
objs inDatePicker
- [flows] support
Screen
when using.data_key_of(...)
and.form_ref_of(...)
- [flows] update flow json with indent and without ensuring ascii
- [flows] adding
health_status
toFlowDetails
- [server] validating
X-Hub-Signature-256
header - [requirements] removing
requests
- [server] default callback url registration delay to 3 sec
- [client] allowing to manage multiple numbers from the same client (Partner solutions)
- [flows] adding
.respond()
shortcut forFlowRequest
- [flows] allowing body in
FlowResponseError
subclasses
- [handlers] introducing
FlowRequestCallbackWrapper
to help split flow endpoint logic to multiple handlers - [client] adding
add_flow_request_handler
method to registerFlowRequestHandler
s - [flows] pop
flow_token
fromFlowCompletion
.response - [docs] update examples
- [flows] added new components
PhotoPicker
,DocumentPicker
,If
andSwitch
- [flows] added
.data_key_of
and.form_ref_of
to refer from other screens - [flows] added
description
toCheckboxGroup
and toRadioButtonsGroup
- [utils] adding
flow_request_media_decryptor
function to decrypt medias from flow requests - [client] allow updating flow application id with
update_flow_metadata
- [server] remove event loop
- [docs] update examples
- [version] bump
FLOW_JSON
version to4.0
- [server] improve continue/stop handling
- [api] fix downloading media content-type
- [client] adding official support for async (limited support for now)
- [api] fix uploads
- [server] expose
webhook_challenge_handler
,webhook_update_handler
andflow_request_handler
- [client] adding
skip_duplicate_updates
when callbacks take too long to return (~25s), defaults to True - [client,handlers] allow to override
continue_handling
- [message] fix async constructors
- [api] remove
requests_toolbelt
from deps - [handlers] fix dynamic field name when
factory_before_filters
- [async] adding beta support for async!
- [client] fix document filename
- [client] allow to modify token and remove handlers/callbacks
- [tests] test client methods
- [client,message_status] Added param
tracker
to all send-message-methods in order to track the message status, allowing to passCallbackData
subclasses totracker
param - [client,api] adding
update_conversational_automation
andget_business_phone_number
to add and getcommands
,ice_breakers
and enableChatOpened
events - [filters] adding
send_to_me
filters shortcut andreplays_to
filters. mark as deprecated all match-specific-type filters and create genericmatches
,regex
filters for all text containing updates - [flows] adding
updated_at
toFlowDetails
- [message] fix
from_user
in system messages - [errors] adding optionals
error_subcode
andtype
to all errors - [logging] improve loggers performance
- [utils] bump graph api version to 19.0 and expose
Version
in the package level - [docs] switch readme to markdown
- [client] fix sending single contact
- [filters] prioritize
/
over!
infilters.command(...)
andfilters.is_command
- [chat_opened] adding a new type:
ChatOpened
- [server] improve handlers and logs
- [types] warning on missing enum constant
- [flows] handle cases where there is no
flow_token
inFlowCompletion
(When the flow completion sent from iOS) - [tests] adding more tests
- [client] Added
register_phone_number
method - [client] mark the
body
arg in send image/video/doc as deprecated. usecaption
instead - [utils] bump
FLOW_JSON
version to 3.1 - [flows] allow
DataSource
inFlowResponse
data - [flows]
Image
.src can be dynamic - [flows] default
ActionNext
to SCREEN - [flows] adding
.success
for screen and adding in-docs examples
- [flows] define
Form
init_values
from childreninit_value
- [flows] adding a new
ScreenData
type to be used in screen.data
- [flows] adding
.form_ref
and.form_ref_of(form_name)
to form components - [docs] adding s real-world example for a complex flow
- [flows] adding full support for WhatsApp Flows!
- [client] adding
request_location
method toWhatsApp
client - [base_update] adding
.raw
attr to hold the original update - [utils] adding
Version
to provide the latest versions to the api & flows, and to perform min checks
- [utils] adding
Version
to provide the latest versions to the api & flows, and to perform min checks
- [flows] add supported types for Layout and Form
.children
and fix FlowPreview.expires_at - [webhook] validate
cryptography
is installed when using the default flows decryptor/encryptor
- [client] expose
set_business_public_key
- [flows] adding
DataKey
andFormRef
to use when building aFlowJSON
- [template] adding support to create and send template with
FlowButton
- [errors] remove
FlowInvalidError
(Too broad error code)
- [errors] adding flows specific errors
- [flows] allow to
@on_flow_request
callbacks to return or raiseFlowResponseError
subclasses
- [base_update] adding
.raw
attr to hold the original update - [requirements] set
cryptography
as extra dependency
- [flows] Adding beta support for WhatsApp Flows!
- [filters] adding new filter called
sent_to
to filter updates even ifWhatsApp(..., filter_updates=False)
- [webhook] renaming route callbacks names to allow multiple
WhatsApp
instances to use the same server - [message_type] default missing to
UNKNOWN
- [bugs] fix bug on interactive message without data
- [reply_to_msg] adding
ReferredProduct
to message context - [filters] adding filter for messages that has
referred_product
in their context - [types] unfrozen editable types
- [base_update] hash updates by their update ID
- [client] adding
dl_session
param of typerequests.Session
to.upload_media
when uploading locally from URL - [errors] adding more
template
andflow
exceptions; fix typo inTooManyMessages
- [reaction] hot-fix for reaction when "unreacting" to a message
- [filters] adding
.extensions(...)
filter for all media filters
- [callback] adding support for
Optional[x]
annotation inCallbackData
subclasses - [media] allowing to pass
pathlib.Path
as a media file path - [system] make all fields nullable in system update
- [template] adding support for
OtpType.ZERO_TAP
in new authentication template - [callback] adding support for optional fields in
CallbackData
- [tests] update
CallbackData
tests
- [handlers] add
StopHandling
to raise if you want to stop handling the update - [errors] include
requests.Response
with all api errors - [client] mark
keyboard
argument in.send_message
as deprecated. usebuttons
instead
- [webhook] allow to register callback url by @david-lev in #18
- [callback] Treat the Template's
QuickReplyButtonData
as an incomingCallbackButton
(Reported by @bcombes in #17) - [handlers] adding
@functools.wraps
to all on_x decorators to preserve callbacks metadata
- [reply] reply to
CallbackButton
.id instead of to.reply_to_message
by @yehuda-lev in #16 - [callback] change default
CallbackData
separators to unused characters (¶
for clb sep,~
for data sep and§
for True boolean
- [callback] hot-fix for last booleans fields on
CallbackData
(WhatsApp Cloud API consider "1: " and "1:" as duplicate datas)
- [types] new
ButtonUrl
type - [client] allowing to provide
mime_type
when sending media as bytes, open file or file path without extensions
- [handlers] apply callback data factory before filters by setting
factory_before_filters
to True when registering the handler
- [template] fix media key
- [webhook] faster field-to-handler matching
- [message-status] make
.pricing_model
optional
- [callback] better typing for
callback_data
andfactory
- [build] Fix package imports
- [callback] allowing to override separators in
CallbackData
subclasses - [tests] starting to adding tests
- [message] reaction messages are also replays (.is_reply)
- [api] bump api version to 18.0
- [template] new update type -
TemplateStatus
; remove deprecated headers - [build] move to
pyproject.toml
- [docs] tips and improvements
- [reaction] Fix ReactionFilter and TextFilter by @yehuda-lev in #12
- [callback] allowing to provide
factory
to construct callback data (Button
andSelection
) into custom object. - [callback] adding type-safe
CallbackData
interface in order to send and receive typed callback data. - [webhook] add protocols for supported web frameworks.
- [template] adding support for
CopyCodeButton
and addLanguage
enum for better typing - [filters] adding
from_countries
filter - [typing] fix typos by @nallon in #10
- [template] adding support for
MPMButton
andCatalogButton
. - [template] rename and mark as deprecated template headers.
- [template] adding support for sending and creating template messages
- [errors] adding more errors
- FIRST STABLE RELEASE - VERSION 1.0.0