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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: whats_this_payload-1.2.4.tar.gz
  • Upload date:
  • Size: 15.9 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.4.tar.gz
Algorithm Hash digest
SHA256 a634796ae5075d812932bd3d5dc62394ed7315fb9ac34081d72d147ef3cb3bba
MD5 d061a0bda93516561b11f5fc99e8c316
BLAKE2b-256 11a22376656882b123486c9a155855b7c7adda312db3122edfb60ac1121b97e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for whats_this_payload-1.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c7375971b2c8263d996c91f09a7ee0c83f7b4f126012c2ce1822b502c1b4ea83
MD5 fcebb6d418c593b25bfd899116153199
BLAKE2b-256 c448e7e902f9dbab4f4c73b13863ff4762102fcbf5e93aab11673b5d81deab28

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