Getting Started
Installation
pip install capo-global-accelerator
Usage
from capo_global_accelerator import AsyncGlobalAcceleratorClient
async def main():
async with AsyncGlobalAcceleratorClient() as global_accelerator:
# Example: call the add_custom_routing_endpoints operation
response = await global_accelerator.add_custom_routing_endpoints()
print(response["endpoint_descriptions"])
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_global_accelerator import AsyncGlobalAcceleratorClient
async def main():
async with AsyncGlobalAcceleratorClient() as global_accelerator:
# Example: paginate over list_accelerators
async for item in global_accelerator.iter_list_accelerators():
print(item)
Error Handling
The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.
from capo_global_accelerator import AsyncGlobalAcceleratorClient
from capo_global_accelerator.error import AccessDeniedException
async def main():
async with AsyncGlobalAcceleratorClient() as global_accelerator:
try:
await global_accelerator.add_custom_routing_endpoints()
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_global_accelerator import AsyncGlobalAcceleratorClient
async def main():
async with AsyncGlobalAcceleratorClient() as global_accelerator:
# Default: 3 attempts for every operation
response = await global_accelerator.add_custom_routing_endpoints()
# Override per operation
response = await global_accelerator.add_custom_routing_endpoints(config_overrides={"retry_max_attempts": 5})
# Disable retries for this call
response = await global_accelerator.add_custom_routing_endpoints(config_overrides={"retry_max_attempts": 1})
Metadata
Release files for capo-global-accelerator 0.2.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_global_accelerator-0.2.0.tar.gz | 147.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_global_accelerator-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 518.3 kB
Release files / capo_global_accelerator-0.2.0.tar.gz
| Download URL | capo_global_accelerator-0.2.0.tar.gz |
|---|---|
| Size | 147.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cd941336b374cd4fca286d6e20aed0ca184b13877872cd2acfd5acb9857ecf2e
|
|
BLAKE2b-256 checksum How to use checksums |
c1b0c0151edde1d3d30913001d557acd3373849718f35204310fe9cccdeee23b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","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_global_accelerator-0.2.0-py3-none-any.whl
| Download URL | capo_global_accelerator-0.2.0-py3-none-any.whl |
|---|---|
| Size | 371.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2ccf49d36c8b5e4eaf877bd6545d3649a1caac423e17aab32b00e620f2a99290
|
|
BLAKE2b-256 checksum How to use checksums |
db25f9611b185c9f27075d34f379aebac71af776789625e3cfacb2487531867d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","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}
|