Getting Started
Installation
pip install capo-sso
Usage
from capo_sso import AsyncSSOClient
async def main():
async with AsyncSSOClient() as sso:
# Example: call the get_role_credentials operation
response = await sso.get_role_credentials()
print(response["role_credentials"])
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_sso import AsyncSSOClient
async def main():
async with AsyncSSOClient() as sso:
# Example: paginate over list_account_roles
async for item in sso.iter_list_account_roles():
print(item)
Error Handling
The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.
from capo_sso import AsyncSSOClient
from capo_sso.error import InvalidRequestException
async def main():
async with AsyncSSOClient() as sso:
try:
await sso.get_role_credentials()
except InvalidRequestException 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_sso import AsyncSSOClient
async def main():
async with AsyncSSOClient() as sso:
# Default: 3 attempts for every operation
response = await sso.get_role_credentials()
# Override per operation
response = await sso.get_role_credentials(config_overrides={"retry_max_attempts": 5})
# Disable retries for this call
response = await sso.get_role_credentials(config_overrides={"retry_max_attempts": 1})
Metadata
Release files for capo-sso 0.11.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_sso-0.11.0.tar.gz | 52.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_sso-0.11.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 122.5 kB
Release files / capo_sso-0.11.0.tar.gz
| Download URL | capo_sso-0.11.0.tar.gz |
|---|---|
| Size | 52.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb42cd3837ca899c1251cdd7dc795e418882db22863261df2a6cfb0b1861a13e
|
|
BLAKE2b-256 checksum How to use checksums |
88d7a6ac99cbddab3bff48cbb25979a2ccaf582015e7c199dbe72aeef07a45d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","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_sso-0.11.0-py3-none-any.whl
| Download URL | capo_sso-0.11.0-py3-none-any.whl |
|---|---|
| Size | 70.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0e87c0d5c257b47db80d690f3327941de1824ff12c539696c3c97e169a1e1d5c
|
|
BLAKE2b-256 checksum How to use checksums |
ea049bc5742db640a7bbc694c501c8ac0a00b4788fac2774471d416b20a3d4b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","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}
|