Getting Started
Installation
pip install capo-lambda-core
Usage
from capo_lambda_core import AsyncLambdaCoreClient
async def main():
async with AsyncLambdaCoreClient() as lambda_core:
# Example: call the create_network_connector operation
response = await lambda_core.create_network_connector()
print(response["arn"])
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_lambda_core import AsyncLambdaCoreClient
async def main():
async with AsyncLambdaCoreClient() as lambda_core:
# Example: paginate over list_network_connectors
async for item in lambda_core.iter_list_network_connectors():
print(item)
Error Handling
The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.
from capo_lambda_core import AsyncLambdaCoreClient
from capo_lambda_core.error import InvalidParameterValueException
async def main():
async with AsyncLambdaCoreClient() as lambda_core:
try:
await lambda_core.create_network_connector()
except InvalidParameterValueException 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_lambda_core import AsyncLambdaCoreClient
async def main():
async with AsyncLambdaCoreClient() as lambda_core:
# Default: 3 attempts for every operation
response = await lambda_core.create_network_connector()
# Override per operation
response = await lambda_core.create_network_connector(config_overrides={"retry_max_attempts": 5})
# Disable retries for this call
response = await lambda_core.create_network_connector(config_overrides={"retry_max_attempts": 1})
Metadata
Release files for capo-lambda-core 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_lambda_core-0.6.0.tar.gz | 80.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_lambda_core-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 195.4 kB
Release files / capo_lambda_core-0.6.0.tar.gz
| Download URL | capo_lambda_core-0.6.0.tar.gz |
|---|---|
| Size | 80.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
85526712e9571c0964d3e5c3d88ee7b10895d0b111472a50ed9c4fbe94d0c436
|
|
BLAKE2b-256 checksum How to use checksums |
29c58a77148e70c032cb720b3b8d6f95ec54789fac225918c2108410012eeabd
|
| 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_lambda_core-0.6.0-py3-none-any.whl
| Download URL | capo_lambda_core-0.6.0-py3-none-any.whl |
|---|---|
| Size | 115.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0217e65ceeb327537aeb350d58e034b99f18bebd1007100b359c88417d03d6ea
|
|
BLAKE2b-256 checksum How to use checksums |
3b9d22bf0d14ef4db84506f94c84501dc8b15670f5d09832be2f3b354d6a7d65
|
| 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}
|