Skip to main content

Django application for Hubspot API integration

Project description

mitol-django-hubspot-api

This is the Open Learning Hubspot API integration app. It provides helper functions for Hubspot CRM API calls:

  • CRUD functions for custom properties and property groups
  • CRUD functions for deals, line items, products, and contacts
  • Search/retrieve specific objects or lists of objects of a certain type

Getting started

pip install mitol-django-hubspot-api

Add the hubspot app:

INSTALLED_APPS = [
    ...
    "mitol.hubspot_api.apps.HubspotApp",
]

Settings

Hubspot app settings

All settings for the mitol-django-hubspot-api app are namespaced in django settings with MITOL_HUBSPOT_API prefix.

  • MITOL_HUBSPOT_API_PRIVATE_TOKEN - the private app token to be used for authentication (required)
  • MITOL_HUBSPOT_API_RETRIES - the number of times to retry API calls on failures (default=3)
  • MITOL_HUBSPOT_API_ID_PREFIX - a prefix used for generating custom unique object ids (default="app")

Usage

Instantiate an API client to make custom hubspot requests

from mitol.hubspot_api.api import HubspotApi, HubspotObjectType

client = HubspotApi()
client.crm.objects.basic_api.update(
    simple_public_object_input=input_body,
    object_id=123,
    object_type=HubspotObjectType.DEALS.value,
)

Use helper functions to make common hubspot requests

from mitol.hubspot_api.api import find_product

hubspot_product = find_product("Product #1", price="123.99")

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

mitol-django-hubspot-api-2023.12.19.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file mitol-django-hubspot-api-2023.12.19.tar.gz.

File metadata

File hashes

Hashes for mitol-django-hubspot-api-2023.12.19.tar.gz
Algorithm Hash digest
SHA256 cdec5eb5ddd20dccdd6dca9a1bfee7cb04f70874367691da24017556f9b4bb58
MD5 e43b725d112390ce9e2de1f0a529bb21
BLAKE2b-256 9dd2dbd852dea16bf07d6fe3e7cfa4fe2fe18b9917d668daeac47950724c91fd

See more details on using hashes here.

File details

Details for the file mitol_django_hubspot_api-2023.12.19-py3-none-any.whl.

File metadata

File hashes

Hashes for mitol_django_hubspot_api-2023.12.19-py3-none-any.whl
Algorithm Hash digest
SHA256 5a761a238474bd5e2c20b4d72a31f7298b6196e453f6e2047cc67590d995068b
MD5 0e9e721423cd0122e5ca96822e8caf95
BLAKE2b-256 37f61a48bd2dd9027ad0784a84c4650d10dd3cb13f0a53632bff0ba6d2f805fc

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