{"id":27632,"library":"capsule-sdk","title":"Capsule SDK","description":"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.","status":"active","version":"0.4.11","language":"python","source_language":"en","source_url":"https://github.com/capsule-org/capsule-python","tags":["sdk","capsule","crm","api-client"],"install":[{"cmd":"pip install capsule-sdk","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"HTTP client used for API requests","package":"httpx","optional":false},{"reason":"Data validation and settings management","package":"pydantic","optional":false}],"imports":[{"note":"Old package name was 'capsule' but renamed to 'capsule-sdk'. Import must use 'capsule_sdk'.","wrong":"from capsule import CapsuleClient","symbol":"CapsuleClient","correct":"from capsule_sdk import CapsuleClient"},{"note":"Models are in the models submodule.","symbol":"Party","correct":"from capsule_sdk.models import Party"}],"quickstart":{"code":"import os\nfrom capsule_sdk import CapsuleClient\n\nclient = CapsuleClient(\n    api_key=os.environ.get('CAPSULE_API_KEY', ''),\n    personal_access_token=os.environ.get('CAPSULE_PAT', '')\n)\n\n# Example: List parties\nparties = client.parties.list()\nprint(parties)","lang":"python","description":"Initialize the client with an API key or personal access token, then call methods on resource attributes like `client.parties.list()`."},"warnings":[{"fix":"Use `CapsuleClient(api_key=..., personal_access_token=...)` or pass environment variables.","message":"In version 0.3.0, the client initialization changed from positional arguments to keyword-only arguments. Old code like `CapsuleClient('key', 'pat')` will break.","severity":"breaking","affected_versions":">=0.3.0"},{"fix":"Uninstall the old package and install `capsule-sdk`. Then update imports to `from capsule_sdk import ...`.","message":"The `capsule` PyPI package is deprecated and no longer maintained. Users should migrate to `capsule-sdk`.","severity":"deprecated","affected_versions":"all (deprecated package)"},{"fix":"Use the client as a context manager: `with CapsuleClient(...) as client:` or reuse a single client instance.","message":"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.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run `pip install capsule-sdk` and ensure you import `from capsule_sdk import CapsuleClient`.","cause":"Installed the wrong package (`capsule` instead of `capsule-sdk`) or forgot to install.","error":"ModuleNotFoundError: No module named 'capsule_sdk'"},{"fix":"Upgrade to the latest version (`pip install --upgrade capsule-sdk`) and use keyword arguments.","cause":"Using an older client initialization pattern or a version before resources were added.","error":"AttributeError: 'CapsuleClient' object has no attribute 'parties'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}