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.6.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.6.0.tar.gz | 230.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_service_catalog-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 857.7 kB
Release files / capo_service_catalog-0.6.0.tar.gz
| Download URL | capo_service_catalog-0.6.0.tar.gz |
|---|---|
| Size | 230.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
59586996ded30683ba3f0ab88266a154b446134a3967e367be68d7740b156456
|
|
BLAKE2b-256 checksum How to use checksums |
84f53821e9dfb7d2400ea2d0577334fdade736d87a8c70c34c749ef083b72e11
|
| 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.6.0-py3-none-any.whl
| Download URL | capo_service_catalog-0.6.0-py3-none-any.whl |
|---|---|
| Size | 627.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4466dbf0601690ecfd9dc4b8fd9c381099ce7d95e6d9eadc23a031edbb359a1d
|
|
BLAKE2b-256 checksum How to use checksums |
3bc7fd45a7d7d2d5fac6e14c90f0500b8f96f62cbcc38f626f02260be4421016
|
| 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}
|