Skip to main content

Easily identify payload message type from popular webhooks

Project description

whats-this-payload

Build Status black-python-styleguide


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 env=dev

Install

pip install whats-this-payload

Basic usage

from whats_this_payload import get_identifier

whatsapp_identifier = get_identifier(webhook="whatsapp") # or any other available integration.

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.2.2.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

whats_this_payload-1.2.2-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file whats_this_payload-1.2.2.tar.gz.

File metadata

  • Download URL: whats_this_payload-1.2.2.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for whats_this_payload-1.2.2.tar.gz
Algorithm Hash digest
SHA256 6bc54b37663c21f425f30a89c1611b5aef6cb7097236b48c87294389b0ed64ab
MD5 49dc0ecf7a77a551d32e351ddf9d317e
BLAKE2b-256 b529a2a5ad6466ddc2cc345fb4ef7fd92d31473cdb2c5c8cbe0691935986e427

See more details on using hashes here.

File details

Details for the file whats_this_payload-1.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for whats_this_payload-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4983c1926812c33624c36ac60bb78ce47e2c2dd26b1108f925969177dd18d0a1
MD5 136ad9be3f4f3e44c1ae4e5ed6874638
BLAKE2b-256 16ec84aa73a52edc3f9e6a05b3a89093d4194e2a65ffd05464d4faf7dbc2c6bc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page