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.4.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.4.0.tar.gz | 229.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_service_catalog-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 854.8 kB
Release files / capo_service_catalog-0.4.0.tar.gz
| Download URL | capo_service_catalog-0.4.0.tar.gz |
|---|---|
| Size | 229.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc19c0ccf6bf24a9563e3958bb5683208fbf610109e06963feac420ea542d1cb
|
|
BLAKE2b-256 checksum How to use checksums |
8f58d3e905571959317f01aa3986612d73f4201a48033c1d7a8be4f0f191f829
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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.4.0-py3-none-any.whl
| Download URL | capo_service_catalog-0.4.0-py3-none-any.whl |
|---|---|
| Size | 625.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c8d3818b5df87b99cb8c707abf5530cb0fe5ba5e6a9a7cce0ee9fde65e818ee7
|
|
BLAKE2b-256 checksum How to use checksums |
72a86ef7242d65fb43d20ef3680faf788b58e23ed4fb5a9721e685071ce98eea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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}
|