A lightweight Python SDK for the Pipedrive API, built with `httpx`.
Project description
Pipedrive API
A lightweight Python SDK for the Pipedrive API, built with httpx.
Installation
pip install pipedrive-api
Usage
from pipedrive import Pipedrive
pipedrive = Pipedrive(domain="yourcompany", api_token="your-api-token")
# Deals
pipedrive.deals.list()
pipedrive.deals.get_by_id(123)
Or use as a context manager:
with Pipedrive(domain="yourcompany", api_token="your-api-token") as pipedrive:
deals = pipedrive.deals.list()
Authentication
Authenticate using your Pipedrive API token. You can find it in Pipedrive under Settings → Personal preferences → API.
It is recommended to load credentials from environment variables rather than hardcoding them:
import os
pipedrive = Pipedrive(
domain=os.environ["PIPEDRIVE_DOMAIN"],
api_token=os.environ["PIPEDRIVE_API_TOKEN"],
)
Error Handling
All non-2xx responses raise a PipedriveError with a status_code attribute:
from pipedrive import Pipedrive, PipedriveError
try:
pipedrive.deals.get_by_id(999)
except PipedriveError as e:
print(e.status_code) # e.g. 404
Version History
Complete version history available in the CHANGELOG.md
Docs
Full API documentation can be found on GitHub Pages
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
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 pipedrive_api-0.6.0.tar.gz.
File metadata
- Download URL: pipedrive_api-0.6.0.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60c189f3883a864e321e7de736304a833331e5c0e99e3948f2ee19196801cc95
|
|
| MD5 |
4f1eda6f560401a9484df2b81c3d1de7
|
|
| BLAKE2b-256 |
b46421faaa3bb94408a3805dfbece8d68cb79b2560c55d96b233e89cf75ee006
|
File details
Details for the file pipedrive_api-0.6.0-py3-none-any.whl.
File metadata
- Download URL: pipedrive_api-0.6.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1c94b3ab67115a2168b27285de6b05ddd8ede63a4e2f7c181ff848033460058
|
|
| MD5 |
69f2598b7c6cfa996d86a4eeb5a71fcd
|
|
| BLAKE2b-256 |
6c00571db4f506411881d8e525a6837a1cf18a22b94d5547d335ebd8892e31f3
|