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.14.1

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.14.1
File Size Uploaded Provenance
pipedrive_api-0.14.1.tar.gz 9.7 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 20.2 kB

Release files / pipedrive_api-0.14.1.tar.gz

Download URL pipedrive_api-0.14.1.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
dfc1273400973cb2ee6d0c0cc7774ce22c9b1c4432d91eb685009bf4b239deae
BLAKE2b-256 checksum
How to use checksums
a879da5bcb39f872c379875753fbaba3c21267cdf2bce7064e5df34438b0f4ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

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

Download URL pipedrive_api-0.14.1-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5fe1f18160e50bc06ca2bedea1e2484bcf1f5f0f1bb962d1d97a6e6d10424676
BLAKE2b-256 checksum
How to use checksums
e0d3f2898121a7dc25607e88389da86aa758e502228f1165241a2f837492b9f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for pipedrive-api 0.14.1

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.

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