Getting Started
Installation
pip install capo-connect
Usage
from capo_connect import AsyncConnectClient
async def main():
async with AsyncConnectClient() as connect:
# Example: call the activate_evaluation_form operation
response = await connect.activate_evaluation_form()
print(response["evaluation_form_id"])
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_connect import AsyncConnectClient
async def main():
async with AsyncConnectClient() as connect:
# Example: paginate over evaluate_data_table_values
async for item in connect.iter_evaluate_data_table_values():
print(item)
Error Handling
The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.
from capo_connect import AsyncConnectClient
from capo_connect.error import InternalServiceException
async def main():
async with AsyncConnectClient() as connect:
try:
await connect.activate_evaluation_form()
except InternalServiceException 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_connect import AsyncConnectClient
async def main():
async with AsyncConnectClient() as connect:
# Default: 3 attempts for every operation
response = await connect.activate_evaluation_form()
# Override per operation
response = await connect.activate_evaluation_form(config_overrides={"retry_max_attempts": 5})
# Disable retries for this call
response = await connect.activate_evaluation_form(config_overrides={"retry_max_attempts": 1})
Metadata
Release files for capo-connect 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_connect-0.6.0.tar.gz | 949.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_connect-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.8 MB
Release files / capo_connect-0.6.0.tar.gz
| Download URL | capo_connect-0.6.0.tar.gz |
|---|---|
| Size | 949.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f532c2369f6433b4bb70651af7b98c406550f5b493968e8ba8cd6131ba3195fe
|
|
BLAKE2b-256 checksum How to use checksums |
917134cb42d851086fc8caa0cf1526614643b0b1da3f212b0c158799f8c1520d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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_connect-0.6.0-py3-none-any.whl
| Download URL | capo_connect-0.6.0-py3-none-any.whl |
|---|---|
| Size | 2.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cff85177f1a07148f1ada0f930ff08017ac4c71172c2e1eb64a667552ea9bc21
|
|
BLAKE2b-256 checksum How to use checksums |
282d8da39ea2ce07110cececbdc2f3bd951ed3efea31781a2bd5954f458071e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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}
|