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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mitol-django-hubspot-api-2023.5.10.tar.gz
.
File metadata
- Download URL: mitol-django-hubspot-api-2023.5.10.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ab67a676437e5eb0ccb26c40e243b771a54357eee85b19674057dd438bc1a10 |
|
MD5 | 8742af00343f61cf7841780ce22a076d |
|
BLAKE2b-256 | 09bc9d4ca2e54801840a6890254c103204b2132dd04a02f23d1176c0f44978fe |
File details
Details for the file mitol_django_hubspot_api-2023.5.10-py3-none-any.whl
.
File metadata
- Download URL: mitol_django_hubspot_api-2023.5.10-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7e765c6decc0d2a6732701b29864547abe4fe0b6fd8172aa58ba192752dee9d |
|
MD5 | 1395881dad987f1a2b8761861bd31fb8 |
|
BLAKE2b-256 | 7f4c9ea2cabc02322b820d510cc506de5a5d3f2707dd744899a6201b23b1463a |