mypy-boto3-amplifyuibuilder type annotations

1.42.3 · active · verified Sat Apr 11

This library provides type annotations for the `boto3` AWS SDK, specifically for the AmplifyUIBuilder service. It enables static type checking with tools like MyPy, Pyright, VSCode, and PyCharm, improving code quality and developer experience. The package is currently at version 1.42.3 and is generated by the `mypy-boto3-builder` (version 8.12.0), which follows a frequent release cadence tied to upstream `boto3` updates and builder improvements.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to obtain a type-hinted `AmplifyUIBuilderClient` using `boto3` and the `mypy-boto3-amplifyuibuilder` stubs. The `TYPE_CHECKING` guard ensures the stub import is only active during type checking, avoiding a runtime dependency on the stub package itself. Remember to have `boto3` installed and configured with AWS credentials.

import boto3
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from mypy_boto3_amplifyuibuilder.client import AmplifyUIBuilderClient

def get_amplifyuibuilder_client() -> AmplifyUIBuilderClient:
    """Gets a typed AmplifyUIBuilder client."""
    client: AmplifyUIBuilderClient = boto3.client(
        "amplifyuibuilder",
        region_name="us-east-1"
    )
    return client

# Example usage (will be type-checked by MyPy)
if __name__ == "__main__":
    try:
        amplify_client = get_amplifyuibuilder_client()
        # Replace with an actual AmplifyUIBuilder API call
        # For example, listing components, if any exist
        print(f"Client type: {type(amplify_client)}")
        # Example: list components (requires valid AWS credentials and existing resources)
        # response = amplify_client.list_components()
        # print(f"Components: {response.get('entities')}")
        print("AmplifyUIBuilder client initialized successfully. Further calls require valid AWS credentials and service usage.")
    except Exception as e:
        print(f"An error occurred: {e}")

view raw JSON →