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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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