Capsule SDK

raw JSON →
0.4.11 verified Sat May 09 auth: no python

The official Python SDK for Capsule, a comprehensive API platform for managing contacts, interactions, and sales pipelines. The current version is 0.4.11, released under active development with an iterative release cadence.

pip install capsule-sdk
error ModuleNotFoundError: No module named 'capsule_sdk'
cause Installed the wrong package (`capsule` instead of `capsule-sdk`) or forgot to install.
fix
Run pip install capsule-sdk and ensure you import from capsule_sdk import CapsuleClient.
error AttributeError: 'CapsuleClient' object has no attribute 'parties'
cause Using an older client initialization pattern or a version before resources were added.
fix
Upgrade to the latest version (pip install --upgrade capsule-sdk) and use keyword arguments.
breaking In version 0.3.0, the client initialization changed from positional arguments to keyword-only arguments. Old code like `CapsuleClient('key', 'pat')` will break.
fix Use `CapsuleClient(api_key=..., personal_access_token=...)` or pass environment variables.
deprecated The `capsule` PyPI package is deprecated and no longer maintained. Users should migrate to `capsule-sdk`.
fix Uninstall the old package and install `capsule-sdk`. Then update imports to `from capsule_sdk import ...`.
gotcha The SDK uses `httpx` internally and creates a new client for each request if not using a context manager. This can cause connection issues under heavy load.
fix Use the client as a context manager: `with CapsuleClient(...) as client:` or reuse a single client instance.

Initialize the client with an API key or personal access token, then call methods on resource attributes like `client.parties.list()`.

import os
from capsule_sdk import CapsuleClient

client = CapsuleClient(
    api_key=os.environ.get('CAPSULE_API_KEY', ''),
    personal_access_token=os.environ.get('CAPSULE_PAT', '')
)

# Example: List parties
parties = client.parties.list()
print(parties)