Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
CapsuleClient
✓ from capsule_sdk import CapsuleClient
✗ from capsule import CapsuleClient
Old package name was 'capsule' but renamed to 'capsule-sdk'. Import must use 'capsule_sdk'.
Party
✓ from capsule_sdk.models import Party
Models are in the models submodule.
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)
Debug
Known issues
breakingIn version 0.3.0, the client initialization changed from positional arguments to keyword-only arguments. Old code like `CapsuleClient('key', 'pat')` will break.fixUse `CapsuleClient(api_key=..., personal_access_token=...)` or pass environment variables.
affects: >=0.3.0
deprecatedThe `capsule` PyPI package is deprecated and no longer maintained. Users should migrate to `capsule-sdk`.fixUninstall the old package and install `capsule-sdk`. Then update imports to `from capsule_sdk import ...`.
affects: all (deprecated package)
gotchaThe 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.fixUse the client as a context manager: `with CapsuleClient(...) as client:` or reuse a single client instance.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'capsule_sdk'
Installed the wrong package (`capsule` instead of `capsule-sdk`) or forgot to install.
fixRun `pip install capsule-sdk` and ensure you import `from capsule_sdk import CapsuleClient`.
AttributeError: 'CapsuleClient' object has no attribute 'parties'
Using an older client initialization pattern or a version before resources were added.
fixUpgrade to the latest version (`pip install --upgrade capsule-sdk`) and use keyword arguments.
Upgrade
Version history
0.4.11latest on PyPI · released May 8, 2026
Audit
Dependencies
httpxrequiredHTTP client used for API requests
pydanticrequiredData validation and settings management