Skip to main content

Getting Started

Installation

pip install capo-cost-and-usage-report-service

Usage

from capo_cost_and_usage_report_service import AsyncCostandUsageReportServiceClient


async def main():
    async with AsyncCostandUsageReportServiceClient() as costand_usage_report_service:
        # Example: call the delete_report_definition operation
        response = await costand_usage_report_service.delete_report_definition()
        print(response["response_message"])

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_cost_and_usage_report_service import AsyncCostandUsageReportServiceClient


async def main():
    async with AsyncCostandUsageReportServiceClient() as costand_usage_report_service:
        # Example: paginate over describe_report_definitions
        async for item in costand_usage_report_service.iter_describe_report_definitions():
            print(item)

Error Handling

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

from capo_cost_and_usage_report_service import AsyncCostandUsageReportServiceClient
from capo_cost_and_usage_report_service.error import InternalErrorException


async def main():
    async with AsyncCostandUsageReportServiceClient() as costand_usage_report_service:
        try:
            await costand_usage_report_service.delete_report_definition()
        except InternalErrorException 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_cost_and_usage_report_service import AsyncCostandUsageReportServiceClient


async def main():
    async with AsyncCostandUsageReportServiceClient() as costand_usage_report_service:
        # Default: 3 attempts for every operation
        response = await costand_usage_report_service.delete_report_definition()

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

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

Metadata

Release files for capo-cost-and-usage-report-service 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for capo-cost-and-usage-report-service 0.4.0
File Size Uploaded Provenance Actions
capo_cost_and_usage_report_service-0.4.0.tar.gz 62.4 kB Without provenance Details for capo_cost_and_usage_report_service-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for capo-cost-and-usage-report-service 0.4.0
File Interpreter ABI Platform Actions
capo_cost_and_usage_report_service-0.4.0-py3-none-any.whl Python 3 none any Details for capo_cost_and_usage_report_service-0.4.0-py3-none-any.whl

Total release size: 161.0 kB

Release files / capo_cost_and_usage_report_service-0.4.0.tar.gz

Download URL capo_cost_and_usage_report_service-0.4.0.tar.gz
Size 62.4 kB
Tags Source
SHA-256 checksum
How to use checksums
dde8a2b1a7f7269de4547ae0ab7966a03b89db219557fe342c3dea37b19e186f
BLAKE2b-256 checksum
How to use checksums
5cb8b7300895ec44123cbc710e05c3a0e47476bb8512ad6711f0fa94a57dcf22
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_cost_and_usage_report_service-0.4.0-py3-none-any.whl

Download URL capo_cost_and_usage_report_service-0.4.0-py3-none-any.whl
Size 98.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
36077d65081b35909450c3daf02d63837a9afaff61e5c91d76375599f3c26d01
BLAKE2b-256 checksum
How to use checksums
a93e8876f85a9064e7b619dbb2769cc38fc70be2f791559b2ebbcc9e8de825db
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}

Security for capo-cost-and-usage-report-service 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page