mypy-boto3 Chime SDK Identity Stubs

1.42.3 · active · verified Sat Apr 11

mypy-boto3-chime-sdk-identity is a type annotation package for the boto3 Chime SDK Identity service, currently at version 1.42.3. It provides comprehensive type hints for boto3 clients, resources, paginators, and waiters, enhancing developer experience with static analysis tools like mypy, PyCharm, and VSCode by enabling better autocomplete and compile-time error checking. The library follows a continuous release cadence, closely mirroring boto3 updates, and is generated by the mypy-boto3-builder.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to initialize a Chime SDK Identity client with type annotations and make a sample API call (`list_app_instances`). The explicit type hints for the client and response objects allow static analysis tools to provide enhanced code completion and error checking.

import boto3
from mypy_boto3_chime_sdk_identity.client import ChimeSDKIdentityClient
from mypy_boto3_chime_sdk_identity.type_defs import ListAppInstancesResponseTypeDef
import os

# Ensure boto3 is configured (e.g., via AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION_NAME env vars)
# For a runnable example, these might be placeholders or rely on default AWS config
# client: ChimeSDKIdentityClient = boto3.client(
#     "chime-sdk-identity",
#     region_name=os.environ.get('AWS_REGION', 'us-east-1')
# )

# Type-hinted client
client: ChimeSDKIdentityClient = boto3.client(
    "chime-sdk-identity",
    region_name="us-east-1" # Replace with your desired region
)

try:
    # Use the client with type hints for methods and arguments
    response: ListAppInstancesResponseTypeDef = client.list_app_instances(
        MaxResults=5
    )
    print("Successfully listed App Instances:")
    for app_instance in response.get('AppInstances', []):
        print(f"  - AppInstanceArn: {app_instance['AppInstanceArn']}")
        print(f"    Name: {app_instance['Name']}")

except client.exceptions.NotFoundException as e:
    print(f"Error: {e}")
except Exception as e:
    print(f"An unexpected error occurred: {e}")

view raw JSON →