Easily identify payload message type from popular webhooks
Project description
whats-this-payload
Table of Contents
- whats-this-payload[#whats-this-payload]
Inspiration
Working with payload from webhooks can be really anoying. This tries to make the process easier.
How to run?
- Create a virtual environment
- Activate the environment
- run
make install-dev
Install
pip install git+ssh://git@github.com/Tomperez98/whats-this-payload.git
Basic usage
from whats_this_payload import get_identifier
whatsapp_identifier = get_identifier(webhook="whatsapp")
webhook_payload_as_dict = payload.dict()
payload_type = whatsapp_identifier(
payload=webhook_payload_as_dict
).identify_payload_type()
print(payload_type)
# >> PayloadType.ANSWER_FROM_LIST_MESSAGE
## Supported payloads (https://developers.facebook.com/docs/whatsapp/cloud-api/webhooks/payload-examples#list-messages)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
whats_this_payload-1.0.0.tar.gz
(15.5 kB
view details)
Built Distribution
File details
Details for the file whats_this_payload-1.0.0.tar.gz
.
File metadata
- Download URL: whats_this_payload-1.0.0.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2df4592495ee686f8e0a3e4d952b3228969d75d01b0ef6b1b0401b2fdf37f10 |
|
MD5 | 7a9db60fd404fa364296f327e2b74c52 |
|
BLAKE2b-256 | 6744eef86fdee21cbd26dc557379466ded79d7fdb9d7b130552ab496cab7c583 |
File details
Details for the file whats_this_payload-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: whats_this_payload-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65bcbf8d4c4989e6db10a78c78b6b35c4b408d3767ae943f62807eb8e459ae2a |
|
MD5 | 1e72831719e7ca24e5eed0ceeec24e8b |
|
BLAKE2b-256 | 3fc7a341f6495be73834189fe4b01d9a349ebcf1cf74c4a07ee0ce43d30573ff |