Getting Started
Installation
pip install capo-eks
Usage
from capo_eks import AsyncEKSClient
async def main():
async with AsyncEKSClient() as eks:
# Example: call the associate_access_policy operation
response = await eks.associate_access_policy()
print(response["cluster_name"])
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_eks import AsyncEKSClient
async def main():
async with AsyncEKSClient() as eks:
# Example: paginate over describe_addon_versions
async for item in eks.iter_describe_addon_versions():
print(item)
Error Handling
The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.
from capo_eks import AsyncEKSClient
from capo_eks.error import InvalidParameterException
async def main():
async with AsyncEKSClient() as eks:
try:
await eks.associate_access_policy()
except InvalidParameterException 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_eks import AsyncEKSClient
async def main():
async with AsyncEKSClient() as eks:
# Default: 3 attempts for every operation
response = await eks.associate_access_policy()
# Override per operation
response = await eks.associate_access_policy(config_overrides={"retry_max_attempts": 5})
# Disable retries for this call
response = await eks.associate_access_policy(config_overrides={"retry_max_attempts": 1})
Release files for capo-eks 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_eks-0.1.0.tar.gz | 234.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_eks-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 769.9 kB
Release files / capo_eks-0.1.0.tar.gz
| Download URL | capo_eks-0.1.0.tar.gz |
|---|---|
| Size | 234.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6880e31d954bcf215521a81a15606ad56b6b2c97f7365ccd8be958dc06ed4d5c
|
|
BLAKE2b-256 checksum How to use checksums |
9e8a707448e221f50b78a4fcf7bd7f40d32e2f792a7d72fbd4511b6e798efa82
|
| 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_eks-0.1.0-py3-none-any.whl
| Download URL | capo_eks-0.1.0-py3-none-any.whl |
|---|---|
| Size | 535.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
99004277b0aeeb401a3cb2c61aef39b817008fd01b2ca9e744d68e7536ac6da9
|
|
BLAKE2b-256 checksum How to use checksums |
b5e31468c8f074f466ae88587bd45e8aa9e44e9795e80d38a8baedbc5361ba0b
|
| 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}
|