Getting Started
Installation
pip install capo-service-catalog
Usage
from capo_service_catalog import AsyncServiceCatalogClient
async def main():
async with AsyncServiceCatalogClient() as service_catalog:
# Example: call the accept_portfolio_share operation
response = await service_catalog.accept_portfolio_share()
print(response)
Pagination
Some operations in this SDK support pagination. If the operation supports pagination it will have an iter_ prefixed method that returns an async iterator.
from capo_service_catalog import AsyncServiceCatalogClient
async def main():
async with AsyncServiceCatalogClient() as service_catalog:
# Example: paginate over describe_portfolio_shares
async for item in service_catalog.iter_describe_portfolio_shares():
print(item)
Error Handling
The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.
from capo_service_catalog import AsyncServiceCatalogClient
from capo_service_catalog.error import InvalidParametersException
async def main():
async with AsyncServiceCatalogClient() as service_catalog:
try:
await service_catalog.accept_portfolio_share()
except InvalidParametersException as e:
print(f"Error: {e}")
print(e.data) # additional error data
Retrying
The SDK retries failed operations automatically. Retry behaviour follows the Smithy specification: errors are retried based on their is_retryable and is_throttling_error attributes. Throttling errors use a longer base delay. Network-level failures (connection errors and timeouts) are also retried. Non-retryable errors, such as client errors without the @retryable trait, are raised immediately without further attempts.
The number of attempts defaults to 3 and can be changed at the client level via retry_max_attempts, or per call via config_overrides.
from capo_service_catalog import AsyncServiceCatalogClient
async def main():
async with AsyncServiceCatalogClient() as service_catalog:
# Default: 3 attempts for every operation
response = await service_catalog.accept_portfolio_share()
# Override per operation
response = await service_catalog.accept_portfolio_share(config_overrides={"retry_max_attempts": 5})
# Disable retries for this call
response = await service_catalog.accept_portfolio_share(config_overrides={"retry_max_attempts": 1})
Metadata
Release files for capo-service-catalog 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| capo_service_catalog-0.5.0.tar.gz | 230.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_service_catalog-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 856.8 kB
Release files / capo_service_catalog-0.5.0.tar.gz
| Download URL | capo_service_catalog-0.5.0.tar.gz |
|---|---|
| Size | 230.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e62852f532365b0c52eca687219e341d0f0e71f42bc7ebddd9bdd4e1583959b5
|
|
BLAKE2b-256 checksum How to use checksums |
da67f7d0944e4bb07659e0508799ba01cb530f4ac61b45e77f592e74314fb25c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / capo_service_catalog-0.5.0-py3-none-any.whl
| Download URL | capo_service_catalog-0.5.0-py3-none-any.whl |
|---|---|
| Size | 626.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e63dbb8c3c5cf861efe8ecfe185761e7ce142097f81c3e83ec4aef0edf99c328
|
|
BLAKE2b-256 checksum How to use checksums |
a17ba41d7fa38df8a3063a114576a60c285f8f59c2073616b76cf0d989d82e73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|