Getting Started
Installation
pip install capo-eks-auth
Usage
from capo_eks_auth import AsyncEKSAuthClient
async def main():
async with AsyncEKSAuthClient() as eks_auth:
# Example: call the assume_role_for_pod_identity operation
response = await eks_auth.assume_role_for_pod_identity()
print(response["subject"])
Error Handling
The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.
from capo_eks_auth import AsyncEKSAuthClient
from capo_eks_auth.error import AccessDeniedException
async def main():
async with AsyncEKSAuthClient() as eks_auth:
try:
await eks_auth.assume_role_for_pod_identity()
except AccessDeniedException 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_auth import AsyncEKSAuthClient
async def main():
async with AsyncEKSAuthClient() as eks_auth:
# Default: 3 attempts for every operation
response = await eks_auth.assume_role_for_pod_identity()
# Override per operation
response = await eks_auth.assume_role_for_pod_identity(config_overrides={"retry_max_attempts": 5})
# Disable retries for this call
response = await eks_auth.assume_role_for_pod_identity(config_overrides={"retry_max_attempts": 1})
Metadata
Release files for capo-eks-auth 0.8.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_auth-0.8.0.tar.gz | 58.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_eks_auth-0.8.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 128.2 kB
Release files / capo_eks_auth-0.8.0.tar.gz
| Download URL | capo_eks_auth-0.8.0.tar.gz |
|---|---|
| Size | 58.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3eaacbfea9ba973e257f9f15dbb42e7132d1ab2f3d231354a2e4a5096d738341
|
|
BLAKE2b-256 checksum How to use checksums |
25b2a3ff357bb22652ac49ab98492374888c86850c1d9fcc26b67c981ed47236
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.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_eks_auth-0.8.0-py3-none-any.whl
| Download URL | capo_eks_auth-0.8.0-py3-none-any.whl |
|---|---|
| Size | 69.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d27cdd2a32eb6cd73fb016b5d7a4663c3814e29584da6fbb91d7b6c354dab33
|
|
BLAKE2b-256 checksum How to use checksums |
96c4cec6bd84a9613c84932b75f8df49238419d54a1c06c27deeacde686ed75a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.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}
|