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 works with the new style generic webhook subscriptions.
  4. Only a 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.2.0.tar.gz (16.0 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.2.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for hubspot_webhook_model-0.2.0.tar.gz
Algorithm Hash digest
SHA256 dee55a2a5db8d64f78a48414649910339477d48c37637d1fc01656221aac58ed
MD5 2466c0da72569da1b94003e13074701a
BLAKE2b-256 7bbfafa62d146fe2f3df7173620f5661fc073a57331e65e8765e96adf527e708

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hubspot_webhook_model-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 566731d94d4ca6f68ba28f609ffc84eb928e8a10236c544c3a369c24b6bb10a2
MD5 c6d737014dbf62db9550f50623b3c2df
BLAKE2b-256 059006286e115cc6ec32b56750e576ff96af0c6fe40e8544d6b7b6cefa676c4f

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