Getting Started
Installation
pip install capo-lambda
Usage
from capo_lambda import AsyncLambdaClient
async def main():
async with AsyncLambdaClient() as lambda_:
# Example: call the delete_function operation
response = await lambda_.delete_function()
print(response["status_code"])
Error Handling
The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.
from capo_lambda import AsyncLambdaClient
from capo_lambda.error import InvalidParameterValueException
async def main():
async with AsyncLambdaClient() as lambda_:
try:
await lambda_.delete_function()
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 import AsyncLambdaClient
async def main():
async with AsyncLambdaClient() as lambda_:
# Default: 3 attempts for every operation
response = await lambda_.delete_function()
# Override per operation
response = await lambda_.delete_function(config_overrides={"retry_max_attempts": 5})
# Disable retries for this call
response = await lambda_.delete_function(config_overrides={"retry_max_attempts": 1})
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file capo_lambda-0.8.0.tar.gz.
File metadata
- Download URL: capo_lambda-0.8.0.tar.gz
- Upload date:
- Size: 277.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65f1c592eccfe6b94e7fdc464ee72a29dba1b61e3d8a2e3745d74f85677bcdb8
|
|
| MD5 |
f7a1220a286c4af7a565bb457e379e6a
|
|
| BLAKE2b-256 |
4b4e70f4d5dfe93176819e99c88ed9d7e56c4fdf5fa5d757d5ee6b226a14c149
|
File details
Details for the file capo_lambda-0.8.0-py3-none-any.whl.
File metadata
- Download URL: capo_lambda-0.8.0-py3-none-any.whl
- Upload date:
- Size: 701.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbeaf951e88d9d50efb379c8d4a48decd53621af2465a2a955c5ff8334ba28d0
|
|
| MD5 |
05e66f5761a4b642b02c3fabfd662164
|
|
| BLAKE2b-256 |
ff2233ca7327975326de7a7832bde120bd177ad6cdfdbe36cfa5da22608d5a47
|