Skip to main content

HubSpot webhook message model

Project description

HubSpot web hooks message models

Models for messages that HubSpot sends as web hook calls to your integrations, written as msgspec models.

Why

It's easier to operate on objects with parsed properties, and the models themselves are missing from HubSpot client.

How

Incoming messages are lists of events, each of which is either related to a single object or an association between objects.

Message can be parsed with the following code:

import msgspec.json
from hubspot_webhook_model import Message

data: bytes # request body
model = msgspec.json.decode(data, type=Message)

Request signatures should be verified using the raw body

Caveats

  1. Messages contain events related to a single event, which can be user action or one of the internal HubSpot mechanisms. They are typically related to a single object, but not always.
  2. Events in a message are not ordered. propertyChange enevts may appear before creation events.
  3. The model only workds with the new style generic webhook subscriptions.
  4. Only small subset of objects is included. Feel free to create Pull Requests with additional models as needed.

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

hubspot_webhook_model-0.1.0.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hubspot_webhook_model-0.1.0-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file hubspot_webhook_model-0.1.0.tar.gz.

File metadata

File hashes

Hashes for hubspot_webhook_model-0.1.0.tar.gz
Algorithm Hash digest
SHA256 37df41dc856e9a5e6a6409f54c7179b1e24febf008850d0e2b89a6ee76a9e75b
MD5 3c5f3e766ddf7d60340a42a2f1757b1f
BLAKE2b-256 727980cde4488f0507b2509595823e9786f9b842284958842993f54320a26dc4

See more details on using hashes here.

File details

Details for the file hubspot_webhook_model-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for hubspot_webhook_model-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e20563c37020751ba40f0fc3b83a9b3bddbe2fd71f5d683179f9a55c8bf1243a
MD5 9054938a1f3a6ced5c0c44a29d6aee7f
BLAKE2b-256 17054566b7a4b451a4a45c5d26951151fbb75c9d223920f0437ee64788057ed6

See more details on using hashes here.

Supported by

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