Getting Started
Installation
pip install capo-transfer
Usage
from capo_transfer import AsyncTransferClient
async def main():
async with AsyncTransferClient() as transfer:
# Example: call the create_access operation
response = await transfer.create_access()
print(response["server_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_transfer import AsyncTransferClient
async def main():
async with AsyncTransferClient() as transfer:
# Example: paginate over list_accesses
async for item in transfer.iter_list_accesses():
print(item)
Error Handling
The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.
from capo_transfer import AsyncTransferClient
from capo_transfer.error import InternalServiceError
async def main():
async with AsyncTransferClient() as transfer:
try:
await transfer.create_access()
except InternalServiceError 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_transfer import AsyncTransferClient
async def main():
async with AsyncTransferClient() as transfer:
# Default: 3 attempts for every operation
response = await transfer.create_access()
# Override per operation
response = await transfer.create_access(config_overrides={"retry_max_attempts": 5})
# Disable retries for this call
response = await transfer.create_access(config_overrides={"retry_max_attempts": 1})
Metadata
Release files for capo-transfer 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_transfer-0.6.0.tar.gz | 289.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_transfer-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 898.1 kB
Release files / capo_transfer-0.6.0.tar.gz
| Download URL | capo_transfer-0.6.0.tar.gz |
|---|---|
| Size | 289.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f800554fd8e36c139a4f7b13bd3b934d24d056e56912ec164887a4e0d7508c6d
|
|
BLAKE2b-256 checksum How to use checksums |
e0ec2afab10640b96da3f68435eb4fcf8aa5d3238bdb6ee1ca74500d1faeac18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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_transfer-0.6.0-py3-none-any.whl
| Download URL | capo_transfer-0.6.0-py3-none-any.whl |
|---|---|
| Size | 608.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
71ac625717b3e5ebeb1feb2fc7041cb387748956116992f5590bae15372e9234
|
|
BLAKE2b-256 checksum How to use checksums |
5f91978add56dbf04c53825c7889517b95033ea30b38ebd03f509ed10763a36f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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}
|