capo-amplify: typed, async Python SDK for AWS Amplify
capo-amplify is a typed Python SDK for AWS Amplify. It has an async client, AsyncAmplifyClient, for asyncio and trio, and a sync client, AmplifyClient, with the same methods. Requests and responses are typed with TypedDicts, so your editor and type checker know every field.
It is part of capo, a community-driven alternative to boto3 and aioboto3, built on its own HTTP stack instead of botocore and generated from the official AWS Smithy models. Documentation: https://capo-sdk.dev/services/amplify/
Installation
pip install capo-amplify
Usage
from capo_amplify import AsyncAmplifyClient
async def main():
async with AsyncAmplifyClient() as amplify:
# Example: call the create_app operation
response = await amplify.create_app()
print(response["app"])
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_amplify import AsyncAmplifyClient
async def main():
async with AsyncAmplifyClient() as amplify:
# Example: paginate over list_apps
async for item in amplify.iter_list_apps():
print(item)
Error Handling
The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.
from capo_amplify import AsyncAmplifyClient
from capo_amplify.error import BadRequestException
async def main():
async with AsyncAmplifyClient() as amplify:
try:
await amplify.create_app()
except BadRequestException 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_amplify import AsyncAmplifyClient
async def main():
async with AsyncAmplifyClient() as amplify:
# Default: 3 attempts for every operation
response = await amplify.create_app()
# Override per operation
response = await amplify.create_app(config_overrides={"retry_max_attempts": 5})
# Disable retries for this call
response = await amplify.create_app(config_overrides={"retry_max_attempts": 1})
Metadata
Release files for capo-amplify 0.10.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_amplify-0.10.0.tar.gz | 139.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_amplify-0.10.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 428.6 kB
Release files / capo_amplify-0.10.0.tar.gz
| Download URL | capo_amplify-0.10.0.tar.gz |
|---|---|
| Size | 139.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
560501c60aa7d6453a8fff32aca9bc33d3e315bb354443e853c88512533d7f8f
|
|
BLAKE2b-256 checksum How to use checksums |
33cc8575bb68dfee7777c7901edbb2b0dff5fb614f99de9714a893f32be1ded4
|
| 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_amplify-0.10.0-py3-none-any.whl
| Download URL | capo_amplify-0.10.0-py3-none-any.whl |
|---|---|
| Size | 289.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
12bb9e6d29f820eacbe92b15bc47a2693ba8038d25a7902173682f09cf1037f7
|
|
BLAKE2b-256 checksum How to use checksums |
a02474d6bcfde862c426c29109c96ca3e2495dae47dbf3e916906ba8b09f2af5
|
| 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}
|