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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: whats_this_payload-1.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 7fc57de527385bddcb525be71c06f1d0fb5833841f3e0b1d8bfd7f2212a8b339
MD5 256fdc7c64c62785fd795cf5c49f9687
BLAKE2b-256 143661b4ca86ff4755767cc5fc842633ac3b6c56b55b997b2d73160f02d5124a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for whats_this_payload-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7e8669510a2de0934b7a1c975ce35e37b7d6ea60cf2f7de7a89c4a7c89d69d5c
MD5 ee0906a8780b3f5e77f81c8d7b32cf26
BLAKE2b-256 9608ffb276ebcbbe23cccf13da3c904e3d13fa0d99e8a6d266abbbd817f0adfd

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