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-2026.4.2.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-2026.4.2-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for mitol_django_hubspot_api-2026.4.2.tar.gz
Algorithm Hash digest
SHA256 00d51c7a7fa3ae0f5961f1a335ed20c3394a4c4a1eeb54686608fc619d126777
MD5 2fbc9bb809008c9e56c9b9e3e12dd215
BLAKE2b-256 840455736cf7b31ee0c73e1c28c1924dda28b886bf99f613f0f94df0a6d154ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mitol_django_hubspot_api-2026.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c0c5bbbc5075be16d004cd36161d51d1a7622298abe7d0a0252d44fd95288b4d
MD5 1a997cc2a96ef1f5d02573dbfa85ef64
BLAKE2b-256 33e363bfe31548d8f2d48d0a6127b6fce4d24414fe854cebfa96af328bc8558d

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