Getting Started
Installation
pip install capo-elastic-load-balancing
Usage
from capo_elastic_load_balancing import AsyncElasticLoadBalancingClient
async def main():
async with AsyncElasticLoadBalancingClient() as s3:
# Example: call the add_tags operation
response = await s3.add_tags()
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_elastic_load_balancing import AsyncElasticLoadBalancingClient
async def main():
async with AsyncElasticLoadBalancingClient() as s3:
# Example: paginate over describe_load_balancers
async for item in s3.iter_describe_load_balancers():
print(item)
Error Handling
The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.
from capo_elastic_load_balancing import AsyncElasticLoadBalancingClient
from capo_elastic_load_balancing.error import AccessPointNotFoundException
async def main():
async with AsyncElasticLoadBalancingClient() as s3:
try:
await s3.add_tags()
except AccessPointNotFoundException 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_elastic_load_balancing import AsyncElasticLoadBalancingClient
async def main():
async with AsyncElasticLoadBalancingClient() as s3:
# Default: 3 attempts for every operation
response = await s3.add_tags()
# Override per operation
response = await s3.add_tags(config_overrides={"retry_max_attempts": 5})
# Disable retries for this call
response = await s3.add_tags(config_overrides={"retry_max_attempts": 1})
Release files for capo-elastic-load-balancing 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_elastic_load_balancing-0.3.0.tar.gz | 101.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_elastic_load_balancing-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 355.6 kB
Release files / capo_elastic_load_balancing-0.3.0.tar.gz
| Download URL | capo_elastic_load_balancing-0.3.0.tar.gz |
|---|---|
| Size | 101.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d41914432dbea858554ac26d5459f59b5155f5b037979aeac039d1075d8e039
|
|
BLAKE2b-256 checksum How to use checksums |
8af2d620eb429f72cbfbdda4d427cc9c8ca60f6eaaf9a724ff6fdcb233d58cf3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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_elastic_load_balancing-0.3.0-py3-none-any.whl
| Download URL | capo_elastic_load_balancing-0.3.0-py3-none-any.whl |
|---|---|
| Size | 254.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a94b2760fcbca50955435204d77bd8d359ea8486613b902f717eb2e3e183488f
|
|
BLAKE2b-256 checksum How to use checksums |
5720b4263245c2577cb7ef0be300b93da74356554ca480d8ccec1e50a77d8fb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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}
|