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})
Release files for capo-global-accelerator 0.1.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.1.0.tar.gz | 139.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_global_accelerator-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 505.0 kB
Release files / capo_global_accelerator-0.1.0.tar.gz
| Download URL | capo_global_accelerator-0.1.0.tar.gz |
|---|---|
| Size | 139.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c87ec5f2ace3af5415c08053a6d217dcb8fd4a53cab2a1224e18ca9186d0158f
|
|
BLAKE2b-256 checksum How to use checksums |
c825c01dbb5b15aa61e395b94f3b38f1651efea4b8d9f948f4a1722b8b823d2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.1.0-py3-none-any.whl
| Download URL | capo_global_accelerator-0.1.0-py3-none-any.whl |
|---|---|
| Size | 365.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f4353d6555882aadecab5e2ac5eac1cec7fe4aa3f394d6701d593b9acc44996a
|
|
BLAKE2b-256 checksum How to use checksums |
9cff2e8ac3f51d3b741a00387fc3a3ed95893fc3b1f64a10b1e96c1a4912383e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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}
|