mypy-boto3-billingconductor Type Annotations

1.42.7 · active · verified Sat Apr 11

mypy-boto3-billingconductor provides drop-in type annotations for the `boto3` BillingConductor service. It enhances development with static type checking for `boto3` clients, resources, paginators, and waiters. Maintained by `mypy-boto3-builder`, it is frequently updated to align with `boto3` releases and ensures compatibility with popular IDEs and type checkers like mypy and pyright.

Warnings

Install

Imports

Quickstart

This example demonstrates how to set up a `boto3` client for BillingConductor with type annotations provided by `mypy-boto3-billingconductor`. The `TYPE_CHECKING` block ensures that the stub import is only used during type checking, avoiding runtime dependencies. It then attempts to list pricing plans, showcasing basic usage.

import boto3
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from mypy_boto3_billingconductor.client import BillingConductorClient

session = boto3.Session()
client: BillingConductorClient = session.client("billingconductor")

try:
    # Example: List Pricing Plans (assuming you have some)
    response = client.list_pricing_plans(
        MaxResults=5
    )
    print(f"Pricing Plans: {response.get('PricingPlans')}")
    print("Quickstart executed successfully, type hints are active.")
except Exception as e:
    print(f"An error occurred: {e}")
    print("This is expected if AWS credentials are not configured or no pricing plans exist.")

view raw JSON →