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-sdk

Usage

from client import PipedriveClient

pipedrive = PipedriveClient(domain="yourcompany", api_token="your-api-token")

# Deals
pipedrive.deals.list()
pipedrive.deals.get_by_id(123)

Or use as a context manager:

with PipedriveClient(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 = PipedriveClient(
    domain=os.environ["PIPEDRIVE_DOMAIN"],
    api_token=os.environ["PIPEDRIVE_API_KEY"],
)

Error Handling

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

from client import PipedriveClient, 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

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.1.0.tar.gz (3.3 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.1.0-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pipedrive_api-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 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.1.0.tar.gz
Algorithm Hash digest
SHA256 53bbb43af4fb436e40192e0b06e5c74ae371b3f1868b57d98fe1676c242bab3b
MD5 dd5fee498ae186ec9fadc106ce45dbd3
BLAKE2b-256 38ebbcaa9e2f359ebf8dd37cd4698ffba9ece8976fe2ac6d4e2617e33623f17c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pipedrive_api-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.3 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 96cff669b451d252a2336317047b7512720dd8edd19b5994a1702e6d89124da4
MD5 68dee4077a865020321427a71b2668bb
BLAKE2b-256 5bb4b03afe813e5d42902a9d6c63f7202053a356f2bdeb696b0cdf1e0b09edb7

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