Skip to main content

Getting Started

Installation

pip install capo-sso

Usage

from capo_sso import AsyncSSOClient


async def main():
    async with AsyncSSOClient() as s3:
        # Example: call the get_role_credentials operation
        response = await s3.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 s3:
        # Example: paginate over list_account_roles
        async for item in s3.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 s3:
        try:
            await s3.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 s3:
        # Default: 3 attempts for every operation
        response = await s3.get_role_credentials()

        # Override per operation
        response = await s3.get_role_credentials(config_overrides={"retry_max_attempts": 5})

        # Disable retries for this call
        response = await s3.get_role_credentials(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

capo_sso-0.2.0.tar.gz (40.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

capo_sso-0.2.0-py3-none-any.whl (61.3 kB view details)

Uploaded Python 3

File details

Details for the file capo_sso-0.2.0.tar.gz.

File metadata

  • Download URL: capo_sso-0.2.0.tar.gz
  • Upload date:
  • Size: 40.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.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}

File hashes

Hashes for capo_sso-0.2.0.tar.gz
Algorithm Hash digest
SHA256 74d70325cdd9a457a72e0a947b5b6e92b17855c1f06fa2f24cd45c5315279c39
MD5 ae541aa12ca7d62ec3ce0da1b45ae9f5
BLAKE2b-256 341c6ff9137890d7616e2b022d62cb663e21bf150d62a56bae2bc7472a43f8e4

See more details on using hashes here.

File details

Details for the file capo_sso-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: capo_sso-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 61.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.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}

File hashes

Hashes for capo_sso-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 897753e5714a86f2110b27c25279da2fa046b4802d2c0130e011537d73a6a8be
MD5 ba806e7df0a0cc07c8f31b361bb1ec55
BLAKE2b-256 9407b4a6240b078ae5ae45b59ddf051f9c5c8b8055b5dd0d33ec4e8c3fac511a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page