upload contacts using python client

so i am am trying to upload a list of contacts into our CRM account

the contacts have different fields but for now i am just trying to upload only 2 fields which are :

1. ParentID

2. Email

i can’t find any decent documentation for the python client in order to use it. can you please either show me how to do it or point out where in the documentation is that avaliable (maybe as a code snippet) ???

i already created a private app with an API token so access the account.

here is my code sofar

from fileinput import filename

import hubspot

from pprint import pprint

from hubspot.crm.imports import ApiException

client = hubspot.Client.create(access_token=‘my_access_token’)

import hubspot

from pprint import pprint

from hubspot.crm.imports import ApiException

try:

api_response = client.crm.imports.core_api.create(files=[‘hubspot.csv’])

pprint(api_response)

except ApiException as e:

print(“Exception when calling core_api->get_by_id: %s\n” % e)

Hi, @mali05 :waving_hand: Hey, @taran42 @BJacobson @JBeatty, do you happen to have a quick Import example using Python that @mali05 can use as a starting off point? As the documentation doesn’t provide one (I’ll inquire about that on my end)

Thank you very much! — Jaycee

thank you

Hey @Jaycee_Lewis @taran42 @BJacobson @JBeatty,

i still didn’t get any help regarding uploading the upload of contacts. can you please post a snippet code here, i would be glad.

I think these two links should get you the info you need.

API Imports

API Contacts

You can also check out the v1 way of doing it, which may be useful.

Update Contacts

i already checked these documentation but they are incomplete. there is no python example on how to do a bulk contact list uplaod.

and when i tried with the API with the example, it just returened a 400 Error code