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.6.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.6.0.tar.gz | 185.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_elastic_beanstalk-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 621.5 kB
Release files / capo_elastic_beanstalk-0.6.0.tar.gz
| Download URL | capo_elastic_beanstalk-0.6.0.tar.gz |
|---|---|
| Size | 185.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
125ec0596ac88f8d4319b77870bfaca2672732c8efab04de44bf9bd271e3b4f2
|
|
BLAKE2b-256 checksum How to use checksums |
bc096f41f82869527bffc5d12bbfd481919ffb515ad753550c01905dfdd4b292
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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.6.0-py3-none-any.whl
| Download URL | capo_elastic_beanstalk-0.6.0-py3-none-any.whl |
|---|---|
| Size | 436.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
061af5504c8a1acafea785cc45097e7b0b2afec8f7e6fe79b00adbccf7ab1932
|
|
BLAKE2b-256 checksum How to use checksums |
8f65ddb0948c55ac2e8431b7e021444fba4da30f60e64caaad2d08558b284c13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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}
|