Getting Started
Installation
pip install capo-elastic-beanstalk
Usage
from capo_elastic_beanstalk import AsyncElasticBeanstalkClient
async def main():
async with AsyncElasticBeanstalkClient() as elastic_beanstalk:
# Example: call the abort_environment_update operation
response = await elastic_beanstalk.abort_environment_update()
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_beanstalk import AsyncElasticBeanstalkClient
async def main():
async with AsyncElasticBeanstalkClient() as elastic_beanstalk:
# Example: paginate over describe_environment_managed_action_history
async for item in elastic_beanstalk.iter_describe_environment_managed_action_history():
print(item)
Error Handling
The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.
from capo_elastic_beanstalk import AsyncElasticBeanstalkClient
from capo_elastic_beanstalk.error import InsufficientPrivilegesException
async def main():
async with AsyncElasticBeanstalkClient() as elastic_beanstalk:
try:
await elastic_beanstalk.abort_environment_update()
except InsufficientPrivilegesException 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_beanstalk import AsyncElasticBeanstalkClient
async def main():
async with AsyncElasticBeanstalkClient() as elastic_beanstalk:
# Default: 3 attempts for every operation
response = await elastic_beanstalk.abort_environment_update()
# Override per operation
response = await elastic_beanstalk.abort_environment_update(config_overrides={"retry_max_attempts": 5})
# Disable retries for this call
response = await elastic_beanstalk.abort_environment_update(config_overrides={"retry_max_attempts": 1})
Metadata
Release files for capo-elastic-beanstalk 0.4.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_beanstalk-0.4.0.tar.gz | 184.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_elastic_beanstalk-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 619.4 kB
Release files / capo_elastic_beanstalk-0.4.0.tar.gz
| Download URL | capo_elastic_beanstalk-0.4.0.tar.gz |
|---|---|
| Size | 184.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2a3fe1101a3de6022db468cc3334804713c58fb69fb74f27641685370d4b1371
|
|
BLAKE2b-256 checksum How to use checksums |
9a64037e888b4ef0628ff02afa870f6b747419522e9256bac7af02078ef0864d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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_beanstalk-0.4.0-py3-none-any.whl
| Download URL | capo_elastic_beanstalk-0.4.0-py3-none-any.whl |
|---|---|
| Size | 435.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a670e33125e160ac708b31233c48d597136dd39a174aa0f5d7636687fbc54aed
|
|
BLAKE2b-256 checksum How to use checksums |
6ee2fe7c1dfef2c29272de215ec555f7277f051bedc1ea4d0782ee4e68a9909d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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}
|