Getting Started
Installation
pip install capo-application-auto-scaling
Usage
from capo_application_auto_scaling import AsyncApplicationAutoScalingClient
async def main():
async with AsyncApplicationAutoScalingClient() as application_auto_scaling:
# Example: call the delete_scaling_policy operation
response = await application_auto_scaling.delete_scaling_policy()
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_application_auto_scaling import AsyncApplicationAutoScalingClient
async def main():
async with AsyncApplicationAutoScalingClient() as application_auto_scaling:
# Example: paginate over describe_scalable_targets
async for item in application_auto_scaling.iter_describe_scalable_targets():
print(item)
Error Handling
The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.
from capo_application_auto_scaling import AsyncApplicationAutoScalingClient
from capo_application_auto_scaling.error import ConcurrentUpdateException
async def main():
async with AsyncApplicationAutoScalingClient() as application_auto_scaling:
try:
await application_auto_scaling.delete_scaling_policy()
except ConcurrentUpdateException 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_application_auto_scaling import AsyncApplicationAutoScalingClient
async def main():
async with AsyncApplicationAutoScalingClient() as application_auto_scaling:
# Default: 3 attempts for every operation
response = await application_auto_scaling.delete_scaling_policy()
# Override per operation
response = await application_auto_scaling.delete_scaling_policy(config_overrides={"retry_max_attempts": 5})
# Disable retries for this call
response = await application_auto_scaling.delete_scaling_policy(config_overrides={"retry_max_attempts": 1})
Metadata
Release files for capo-application-auto-scaling 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_application_auto_scaling-0.2.0.tar.gz | 118.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_application_auto_scaling-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 352.8 kB
Release files / capo_application_auto_scaling-0.2.0.tar.gz
| Download URL | capo_application_auto_scaling-0.2.0.tar.gz |
|---|---|
| Size | 118.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f826cc97e5a8401ce5d08018679e217e9324fc8ff7f024223ecfdf3e1a29ed54
|
|
BLAKE2b-256 checksum How to use checksums |
556aa0ca2573818e6906277c8ee2e949844945a2d81c20a3c2090d9e15c04afb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","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_application_auto_scaling-0.2.0-py3-none-any.whl
| Download URL | capo_application_auto_scaling-0.2.0-py3-none-any.whl |
|---|---|
| Size | 234.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
61e9548d66c7b5ce2f6640b30c52c276128c5e778bfb15144bd9ef8a689c3e59
|
|
BLAKE2b-256 checksum How to use checksums |
1e3c111d8df0da23d51c037adfb4e32ce762dfffc7c801e85e1b57185b1e7d81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","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}
|