Skip to main content

Python SDK for Elastic Load Balancing.

Project description

Getting Started

Installation

pip install capo-elastic-load-balancing

Usage

from capo_elastic_load_balancing import AsyncElasticLoadBalancingClient


async def main():
    async with AsyncElasticLoadBalancingClient() as s3:
        # Example: call the add_tags operation
        response = await s3.add_tags()
        print(response)

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_elastic_load_balancing import AsyncElasticLoadBalancingClient


async def main():
    async with AsyncElasticLoadBalancingClient() as s3:
        # Example: paginate over describe_load_balancers
        async for item in s3.iter_describe_load_balancers():
            print(item)

Error Handling

The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.

from capo_elastic_load_balancing import AsyncElasticLoadBalancingClient
from capo_elastic_load_balancing.error import AccessPointNotFoundException


async def main():
    async with AsyncElasticLoadBalancingClient() as s3:
        try:
            await s3.add_tags()
        except AccessPointNotFoundException 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_elastic_load_balancing import AsyncElasticLoadBalancingClient


async def main():
    async with AsyncElasticLoadBalancingClient() as s3:
        # Default: 3 attempts for every operation
        response = await s3.add_tags()

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

        # Disable retries for this call
        response = await s3.add_tags(config_overrides={"retry_max_attempts": 1})

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

capo_elastic_load_balancing-0.2.0.tar.gz (96.7 kB view details)

Uploaded Source

Built Distribution

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

capo_elastic_load_balancing-0.2.0-py3-none-any.whl (247.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: capo_elastic_load_balancing-0.2.0.tar.gz
  • Upload date:
  • Size: 96.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","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_elastic_load_balancing-0.2.0.tar.gz
Algorithm Hash digest
SHA256 92afa3d68dcf2b3926493b3e5fa19e16903ebe164bc44b65c272864ae5ab218b
MD5 b2ebbb1203c85cb4a5a0e2a43826f739
BLAKE2b-256 2d95aa9aa24360006dbc0d4d26c87500b3322e82ec0bb283b4fa28c807f65148

See more details on using hashes here.

File details

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

File metadata

  • Download URL: capo_elastic_load_balancing-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 247.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","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_elastic_load_balancing-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 30e1faf15d7a0ccc5ce2401e0fca806c5c3992298b4f3b38f652b9eeab8f42e9
MD5 8094b3e312fe6fd2768862cc562a1577
BLAKE2b-256 6ef316506f96d16db6d1d51b5a16f88da8c573289110dc60dd569c4f718c7ddc

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 Pingdom Monitoring Sentry Error logging StatusPage Status page