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

Uploaded Source

Built Distribution

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

mitol_django_hubspot_api-2025.12.18-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file mitol_django_hubspot_api-2025.12.18.tar.gz.

File metadata

File hashes

Hashes for mitol_django_hubspot_api-2025.12.18.tar.gz
Algorithm Hash digest
SHA256 3d67d3f64bc6b49c14548d712460321d7a1da1dbcfc61f77ba0c3023457969cb
MD5 adcedbc8a4abb6d6267ea5be4e620541
BLAKE2b-256 64b6cf6eebe4819db7278b30f27d37202eea329469aaaf09f5a412e78c4cc1b4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mitol_django_hubspot_api-2025.12.18-py3-none-any.whl
Algorithm Hash digest
SHA256 ee062a5f1194f120f810bedad93f19a0f47c3e42c45eb94ced01296b8522bfe0
MD5 5f36292d1ed050df046244ff0bf29a41
BLAKE2b-256 220397446dd46de978d27dda229d2ea7208ca9729dde15e5e50d7dc311d0001b

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