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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pipedrive_api-0.14.1.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pipedrive_api-0.14.1-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file pipedrive_api-0.14.1.tar.gz.

File metadata

  • Download URL: pipedrive_api-0.14.1.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pipedrive_api-0.14.1.tar.gz
Algorithm Hash digest
SHA256 dfc1273400973cb2ee6d0c0cc7774ce22c9b1c4432d91eb685009bf4b239deae
MD5 fb186561532041a61ca5e4dd103de207
BLAKE2b-256 a879da5bcb39f872c379875753fbaba3c21267cdf2bce7064e5df34438b0f4ef

See more details on using hashes here.

File details

Details for the file pipedrive_api-0.14.1-py3-none-any.whl.

File metadata

  • Download URL: pipedrive_api-0.14.1-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pipedrive_api-0.14.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5fe1f18160e50bc06ca2bedea1e2484bcf1f5f0f1bb962d1d97a6e6d10424676
MD5 2fff2b5bc02de58454ce218b8fe5f2b3
BLAKE2b-256 e0d3f2898121a7dc25607e88389da86aa758e502228f1165241a2f837492b9f9

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.14.1 This release

2 files

0.14.0

2 files

0.13.0

2 files

0.12.0

2 files

0.11.0

2 files

0.10.0

2 files

0.9.1

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

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