To retrieve data from HubSpot:
import devart.hubspot as hubspot
connect() module method and obtain a connection object:
my_connection = hubspot.connect(
Authentication="APIKey",
APIKey="your_api_key"
)
my_connection = hubspot.connect(
Authentication="PrivateApp",
AccessToken="your_access_token"
)
response = devart.hubspot.signin()
my_connection = hubspot.connect(
Authentication="OAuth",
RefreshToken=response["Refresh Token"]
)
cursor object using the cursor() connection method.
my_cursor = my_connection.cursor()
execute() cursor method.
my_cursor.execute("SELECT * FROM employees")
fetch*() cursor methods.
for row in my_cursor.fetchall():
print(row)