New level of functionality and performance in data access via Python
Project description
Python Connector for HubSpot
Python Connector for HubSpot is a connectivity solution for accessing HubSpot from Python applications to read and update data. It fully implements the Python DB API 2.0 specification. The connector is distributed as a wheel package for Windows and Windows Server.
Standard SQL syntax
The connector fully supports the ANSI SQL standard and lets you execute SQL statements against your HubSpot data just like you would normally work with relational databases. Simple queries are directly converted to HubSpot API calls and executed on the HubSpot side.
Connecting
To establish a connection to HubSpot, import the connector and authenticate using basic or OAuth 2.0 authentication.
Import the connector
First, import the HubSpot connector module:
import devart.hubspot as hubspot
Establish a connection
Connect to your HubSpot account using the connect() module method and obtain a connection object.
You can connect to HubSpot using API key, access token, or OAuth 2.0 authentication.
API key authentication
For API key authentication, provide your HubSpot API key:
my_connection = hubspot.connect(
Authentication="APIKey", APIKey="your_api_key"
)
Replace the example value with your actual API key.
Access token authentication
For access token authentication, provide your HubSpot access token:
my_connection = hubspot.connect(
Authentication="PrivateApp",
AccessToken="your_access_token"
)
Replace the example value with your actual access token.
OAuth 2.0 authentication
For OAuth 2.0 authentication, first obtain a refresh token, then use it to establish the connection:
response = devart.hubspot.signin()
my_connection = hubspot.connect(
Authentication="OAuth",
RefreshToken=response["Refresh Token"]
)
Replace the example values with your actual refresh token.
Querying data
Once connected to HubSpot, you can execute SQL queries to retrieve data from HubSpot.
Execute a query
Create a cursor object using the cursor() connection method.
my_cursor = my_connection.cursor()
Execute a SQL query using the execute() cursor method.
my_cursor.execute("SELECT * FROM employees")
Retrieve results using one of the fetch*() methods.
for row in my_cursor.fetchall():
print(row)
Parameterized queries
You can use parameterized queries to pass variable values to your SQL statements. This allows you to reuse the same query with different data and helps to prevent SQL injection attacks.
Pass parameters as a list or tuple to the
execute()
method:
query = "SELECT Id, Name FROM Contact WHERE Name = ? AND Email = ?"
params = ["Jordan Sanders", "jordansanders@example.com"]
my_cursor.execute(query, params)
results = my_cursor.fetchall()
for row in results:
print(row)
Each placeholder ? in the query is replaced with a corresponding value from the parameter list.
Ordering and activating the license
You can purchase a license for the connector on the ordering page:
https://www.devart.com/python/hubspot/ordering.html
To activate the license, follow the instructions in the documentation:
https://docs.devart.com/python/hubspot/activate-a-license.htm
What's new
Python Connector for HubSpot 1.3
- Added support for Python 3.14
- Extended the list of supported tables
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 Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file devart_hubspot_connector-1.3.0-cp314-cp314-win_amd64.whl.
File metadata
- Download URL: devart_hubspot_connector-1.3.0-cp314-cp314-win_amd64.whl
- Upload date:
- Size: 5.9 MB
- Tags: CPython 3.14, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
803559e261796c1462fec159f7496cb06f1e1d26e4b518f008bf77dad28e2c33
|
|
| MD5 |
8be04224670a8e74afb4493e1a23a0ca
|
|
| BLAKE2b-256 |
08d34467ed9f8f8b0d201d8eb49b439f85c0e4aa7e290ce004856214e2939c2b
|
File details
Details for the file devart_hubspot_connector-1.3.0-cp314-cp314-win32.whl.
File metadata
- Download URL: devart_hubspot_connector-1.3.0-cp314-cp314-win32.whl
- Upload date:
- Size: 5.7 MB
- Tags: CPython 3.14, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40bda74cec85d22dcc70c42c16130ace01bbb8c89fe1385693757b66691ad4de
|
|
| MD5 |
cadb87f45c7e0b54495771b41c7715a2
|
|
| BLAKE2b-256 |
bd9844a7b3be451c9a67a8756432f798f73a3c2cde45f41d8d0509a20ce38df0
|
File details
Details for the file devart_hubspot_connector-1.3.0-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: devart_hubspot_connector-1.3.0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 5.9 MB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2aff62ecf852564a1153b0de121027bce9c2078a9577f7b19682e9b90937cbd9
|
|
| MD5 |
7471e39e37ad25df73ffe86dfd2026c7
|
|
| BLAKE2b-256 |
4f708a023a6f8ed336899a74600fe49f424eac99b5f9a7f0cb28d8fe7ee5c41c
|
File details
Details for the file devart_hubspot_connector-1.3.0-cp313-cp313-win32.whl.
File metadata
- Download URL: devart_hubspot_connector-1.3.0-cp313-cp313-win32.whl
- Upload date:
- Size: 5.7 MB
- Tags: CPython 3.13, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c123a1fef3fa0c9b0659b2df0156954abae534c56e660732bd5c0de4226322ff
|
|
| MD5 |
9ca1703493c99f2e6e112cff1e2c8748
|
|
| BLAKE2b-256 |
838eff3d11dc62f754a3179b6859c721b8c0045be0d4f36e47c2657efef3c148
|
File details
Details for the file devart_hubspot_connector-1.3.0-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: devart_hubspot_connector-1.3.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 5.9 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7f452d3e1a82d522f285e731d1af221a61d832a7d6ad3be3bd2975737f46de1
|
|
| MD5 |
5677c4a48b0329a0aaa48facf7e482e1
|
|
| BLAKE2b-256 |
f4c2b2619f31638bf79025d845c6002bb36b807fdd1c79dbcf3fb08e6f3b26d7
|
File details
Details for the file devart_hubspot_connector-1.3.0-cp312-cp312-win32.whl.
File metadata
- Download URL: devart_hubspot_connector-1.3.0-cp312-cp312-win32.whl
- Upload date:
- Size: 5.7 MB
- Tags: CPython 3.12, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50bc4ad8630aec6cf34d0e2e118cbda7865403b4bad8aa0056175723eb8a5c1d
|
|
| MD5 |
ec2e36335493a61d2228e4ef9e338838
|
|
| BLAKE2b-256 |
960cfb7ebfc24b328e8cc66fd19073f7749202be89ad0c37d06c5d89b1fcdcec
|
File details
Details for the file devart_hubspot_connector-1.3.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: devart_hubspot_connector-1.3.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 5.9 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbfd901b4ae9bfcade0c698669bc18428aa0777a35a5028e3c15ccebf431cc8d
|
|
| MD5 |
acb2d075ab6b05f7d47c9f3ad10f6949
|
|
| BLAKE2b-256 |
0c4b12d447825e73bb06dddcde95be2ac40d4fe93fb921afd1f5399bd3caa677
|
File details
Details for the file devart_hubspot_connector-1.3.0-cp311-cp311-win32.whl.
File metadata
- Download URL: devart_hubspot_connector-1.3.0-cp311-cp311-win32.whl
- Upload date:
- Size: 5.7 MB
- Tags: CPython 3.11, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
450c54b1c600d7796d57885668dc6e9884a2c372a2c467c4a2dc60c75593bb6e
|
|
| MD5 |
d19d2e77223fc6b64dcfd9564e9f587b
|
|
| BLAKE2b-256 |
472308b6667e1eaf8848af344d53d9a7274efd75ace6cb1024178d6520259f53
|
File details
Details for the file devart_hubspot_connector-1.3.0-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: devart_hubspot_connector-1.3.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 5.9 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5a5ceb70ef94a29566dcb18935498d28f2201a98e0e64244472ead12495fc00
|
|
| MD5 |
d6f834042ce0145057759560a584ea3a
|
|
| BLAKE2b-256 |
49f1bda2676548b8133b540728219c9e942f745961d73655ea6f74a4d8a90a35
|
File details
Details for the file devart_hubspot_connector-1.3.0-cp310-cp310-win32.whl.
File metadata
- Download URL: devart_hubspot_connector-1.3.0-cp310-cp310-win32.whl
- Upload date:
- Size: 5.7 MB
- Tags: CPython 3.10, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c50ecc733ca5a272aaea6cb14eab584c6e5a229f0f6c10ff632edeb608f2dbba
|
|
| MD5 |
b358527fe453284c2d4a5b13403f15a3
|
|
| BLAKE2b-256 |
04f1827f806f63d9c9a6c1312c3388a5d5894e61f0411273b96b685cc31e808a
|
File details
Details for the file devart_hubspot_connector-1.3.0-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: devart_hubspot_connector-1.3.0-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 5.9 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79c81ed52ea073df6bfba3b58c8f11bde6606aff7a92f19bcbfbfdf9aeb2a59d
|
|
| MD5 |
ee3792fc945d715033c0b3c51b585cb3
|
|
| BLAKE2b-256 |
ef3421b6c1c8b85187086edb3c82129c2140b7f3b98716db61472cb7ce6410dd
|
File details
Details for the file devart_hubspot_connector-1.3.0-cp39-cp39-win32.whl.
File metadata
- Download URL: devart_hubspot_connector-1.3.0-cp39-cp39-win32.whl
- Upload date:
- Size: 5.7 MB
- Tags: CPython 3.9, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e0815fe0f593c2f2e1c78fd7f14b328f5fb8dd468d49e0b77526cd8723ea79f
|
|
| MD5 |
e3c03380e8b1da74173a8f3cb330c734
|
|
| BLAKE2b-256 |
82c66f987e4646caef6ffb1fc6ef1c41f96789a888e13bd0022043674da480bd
|
File details
Details for the file devart_hubspot_connector-1.3.0-cp38-cp38-win_amd64.whl.
File metadata
- Download URL: devart_hubspot_connector-1.3.0-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 5.9 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc906dbe851f4b3d28f55e02652635091585119539b5a4a2ffe9f38ba60d7419
|
|
| MD5 |
05cf5c24c40265f3622ea7f3966a1273
|
|
| BLAKE2b-256 |
3c7da0d491f2b79aec76ce9a3e223eb0debe2f2124bd8157de619af98dde0cdb
|
File details
Details for the file devart_hubspot_connector-1.3.0-cp38-cp38-win32.whl.
File metadata
- Download URL: devart_hubspot_connector-1.3.0-cp38-cp38-win32.whl
- Upload date:
- Size: 5.7 MB
- Tags: CPython 3.8, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8a1ff5f62d45854b625daa461ee22081464ef6f307c26b4cf325c3897d500c6
|
|
| MD5 |
f86cc9f9a978271c64b5e60b28431b47
|
|
| BLAKE2b-256 |
9e651a4aff15c3382c0d77b21bfc0e81d0e78c13033ff524cb8b26657126ef27
|
File details
Details for the file devart_hubspot_connector-1.3.0-cp37-cp37m-win_amd64.whl.
File metadata
- Download URL: devart_hubspot_connector-1.3.0-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 5.9 MB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76799e35835e03fe7d291480399e0ebeb6f2ec6e242bcd71e2323ab9264bcb72
|
|
| MD5 |
45421b6f6fa67de2c2b086dc438bfca9
|
|
| BLAKE2b-256 |
f94cf1dd76bf4ea778982677e1ac67e5c076f2eb43918fd42f0dbfcc8860a03a
|
File details
Details for the file devart_hubspot_connector-1.3.0-cp37-cp37m-win32.whl.
File metadata
- Download URL: devart_hubspot_connector-1.3.0-cp37-cp37m-win32.whl
- Upload date:
- Size: 5.7 MB
- Tags: CPython 3.7m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9449dfb6369f888e3e4af1b6f5bc02fa35711468368a146ae3051464bcf6af5d
|
|
| MD5 |
46ebeb5ac29d2f9f638162b4cb964919
|
|
| BLAKE2b-256 |
5795b336863df394fe411f1f052f371b6bd1f036005eb1065fbda970b1c31fa3
|