Skip to main content

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


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.7.0.tar.gz (8.5 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.7.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pipedrive_api-0.7.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pipedrive_api-0.7.0.tar.gz
Algorithm Hash digest
SHA256 e6589e37c03dffcebf184158477b352bfae15318336ce6bdf6916e83bbc20fed
MD5 e6baf9709c2128261c950680786312b3
BLAKE2b-256 3b3295dd8b1353e4b123c517aa5749df8ecf1d98f7b4de5623992fd02caa96b9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pipedrive_api-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pipedrive_api-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3245d6765b433ea43a44c5f8d286f5f5cbe812ae538c22f17f89873dc36ba0ee
MD5 3c73fc0b8dae82ce07d79618b49838ef
BLAKE2b-256 2db506e3b1dcaae4628b2de0cdfbdf316d3b23c881543aa6a1d97191cacd1f8b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page