Getting Started
Installation
pip install capo-bcm-recommended-actions
Usage
from capo_bcm_recommended_actions import AsyncBCMRecommendedActionsClient
async def main():
async with AsyncBCMRecommendedActionsClient() as bcm_recommended_actions:
# Example: call the list_recommended_actions operation
response = await bcm_recommended_actions.list_recommended_actions()
print(response["recommended_actions"])
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_bcm_recommended_actions import AsyncBCMRecommendedActionsClient
async def main():
async with AsyncBCMRecommendedActionsClient() as bcm_recommended_actions:
# Example: paginate over list_recommended_actions
async for item in bcm_recommended_actions.iter_list_recommended_actions():
print(item)
Error Handling
The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.
from capo_bcm_recommended_actions import AsyncBCMRecommendedActionsClient
from capo_bcm_recommended_actions.error import AccessDeniedException
async def main():
async with AsyncBCMRecommendedActionsClient() as bcm_recommended_actions:
try:
await bcm_recommended_actions.list_recommended_actions()
except AccessDeniedException 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_bcm_recommended_actions import AsyncBCMRecommendedActionsClient
async def main():
async with AsyncBCMRecommendedActionsClient() as bcm_recommended_actions:
# Default: 3 attempts for every operation
response = await bcm_recommended_actions.list_recommended_actions()
# Override per operation
response = await bcm_recommended_actions.list_recommended_actions(config_overrides={"retry_max_attempts": 5})
# Disable retries for this call
response = await bcm_recommended_actions.list_recommended_actions(config_overrides={"retry_max_attempts": 1})
Metadata
Release files for capo-bcm-recommended-actions 0.3.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_bcm_recommended_actions-0.3.0.tar.gz | 56.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_bcm_recommended_actions-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 126.1 kB
Release files / capo_bcm_recommended_actions-0.3.0.tar.gz
| Download URL | capo_bcm_recommended_actions-0.3.0.tar.gz |
|---|---|
| Size | 56.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3125d61eea6078c0d4fb28c7f04aedf1901027fb6f21c8d2cd3c5a42c077de36
|
|
BLAKE2b-256 checksum How to use checksums |
cd8adbc727b675073c116f19efebc9602ba0540d04c366f0ab2457e4319db723
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","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_bcm_recommended_actions-0.3.0-py3-none-any.whl
| Download URL | capo_bcm_recommended_actions-0.3.0-py3-none-any.whl |
|---|---|
| Size | 70.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bf574e3ee316e253e8b51ee8738ea9227b3bc182991d3fa656d3d9c0cf620cc9
|
|
BLAKE2b-256 checksum How to use checksums |
bf6e4106ee8c1b5ca8d28924d4b09022f7ab275ef11b3e111d3e489d8276bc14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","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}
|