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

Uploaded Source

Built Distribution

whats_this_payload-1.2.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: whats_this_payload-1.2.0.tar.gz
  • Upload date:
  • Size: 15.4 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.0.tar.gz
Algorithm Hash digest
SHA256 40c024eb8b32a09d17df90171a4277bb9cbe0afd6f13ea0a87a6395ff7ab54db
MD5 33b0b36ff9a3a98009a13d3d662b6b74
BLAKE2b-256 8bbb17316bbd1560495f7ece9ac602615ad3e7f816a3f0d886e2352dd2f47182

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for whats_this_payload-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 63cac7157395805adf91ccf55e56ce2a429eaa935369ad15087557775a3c80d9
MD5 b50515660e6f62b12677043944f6366b
BLAKE2b-256 9b8d88576e09b3135645d25fd3b9758f0173e0e936d34922530c1ef3023a90d9

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