Skip to main content

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(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"],
)

Pagination

.list() returns a single page of results. Use .stream() to automatically paginate through all results, yielding one item at a time:

for deal in pipedrive.deals.stream():
    print(deal["id"])

This works on all endpoints that support listing:

for org in pipedrive.organizations.stream():
    ...

for person in pipedrive.persons.stream():
    ...

You can pass the same filtering parameters as .list():

for deal in pipedrive.deals.stream(status="open", limit=50):
    print(deal["title"])

To collect all results into a list:

all_deals = list(pipedrive.deals.stream())

Error Handling

All non-2xx responses raise a PipedriveError with a status_code attribute:

from pipedrive import Pipedrive, PipedriveError

try:
    pipedrive.deals.get(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

Metadata

Release files for pipedrive-api 0.15.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pipedrive-api 0.15.0
File Size Uploaded Provenance Actions
pipedrive_api-0.15.0.tar.gz 9.7 kB Without provenance Details for pipedrive_api-0.15.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pipedrive-api 0.15.0
File Interpreter ABI Platform Actions
pipedrive_api-0.15.0-py3-none-any.whl Python 3 none any Details for pipedrive_api-0.15.0-py3-none-any.whl

Total release size: 20.1 kB

Release files / pipedrive_api-0.15.0.tar.gz

Download URL pipedrive_api-0.15.0.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5454a7fbc69f5fd015627a157213833feacd454c305daafc20b5470d33737eff
BLAKE2b-256 checksum
How to use checksums
3c866124626991eabfa8d9152b1a98d8521225f58f2fff0e245e515724617746
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / pipedrive_api-0.15.0-py3-none-any.whl

Download URL pipedrive_api-0.15.0-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e969e432d0713c7066e615803b25c6d4556e5f20b09f899b5b240d4de7a8b21
BLAKE2b-256 checksum
How to use checksums
25f4be99cd335432bad41af7a870dbcebe6e4a10e6c0bf13b13a146b84a1773d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for pipedrive-api 0.15.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page