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.7.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 | Provenance | Actions |
|---|---|---|---|---|
| capo_cost_and_usage_report_service-0.7.0.tar.gz | 65.9 kB | Without provenance | Details for capo_cost_and_usage_report_service-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| capo_cost_and_usage_report_service-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for capo_cost_and_usage_report_service-0.7.0-py3-none-any.whl |
Total release size: 168.2 kB
Release files / capo_cost_and_usage_report_service-0.7.0.tar.gz
| Download URL | capo_cost_and_usage_report_service-0.7.0.tar.gz |
|---|---|
| Size | 65.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c6b130f30d4740b8682f75d5a8fd0184cebe4959b6cd0dc9e3221b3184b7dd7
|
|
BLAKE2b-256 checksum How to use checksums |
def948baf65f1ea13d6db9d82934c4a758d0b0c9fa245abd7911b0a7c277bc98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.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}
|
Release files / capo_cost_and_usage_report_service-0.7.0-py3-none-any.whl
| Download URL | capo_cost_and_usage_report_service-0.7.0-py3-none-any.whl |
|---|---|
| Size | 102.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ce2fb9614b6813d6c68a409f9b9b662ebcf7714b5b494a32e38bf69d633ce2e5
|
|
BLAKE2b-256 checksum How to use checksums |
fc83da6ed08f894b16dcbf01f1b59aca2496d5de34dcb27fcf155e04ed3810fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.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}
|
Security for capo-cost-and-usage-report-service 0.7.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.