HubSpot-python CRM-objects sample app

December 8, 2022 ยท View on GitHub

Requirements

  1. Make sure you have Python 3.8+ installed.
  2. Configured .env file

Running

  1. Install dependencies
pip3 install -r requirements.txt
  1. Commands

Show all commands (get help)

python cli.py -h

Get objects

python cli.py -m get_page -t [object_type]

Get an object by id

python cli.py -m get_by_id -t [object_type] -i [object_id]

Create new object

python cli.py -m create -t [object_type] -p [params]

Params is a json, example:

'{"email":"some@email.com","firstname":"Brian","lastname":"Halligan"}'

Delete an object by id

python cli.py -m archive -t [object_type] -i [object_id]

Update an object by id

python cli.py -m update -t [object_type] -i [object_id] -p [params]

Params is a json, example:

'{"firstname":"John"}'