mypy-boto3-appintegrations

1.42.63 · active · verified Sat Apr 11

mypy-boto3-appintegrations provides comprehensive type annotations for the AWS AppIntegrations Service, designed for use with the `boto3` library. It ensures strong static type checking for AppIntegrations client and related operations. The current version is 1.42.63, with updates released frequently in sync with `boto3` and AWS API changes, driven by the `mypy-boto3-builder` project.

Warnings

Install

Imports

Quickstart

Demonstrates how to initialize a `boto3` client and use it with type annotations provided by `mypy-boto3-appintegrations`. The `TYPE_CHECKING` block ensures that stub imports are only processed by type checkers.

import boto3
import os
from typing import TYPE_CHECKING

# These imports are only for type checking, not for runtime execution
if TYPE_CHECKING:
    from mypy_boto3_appintegrations.client import AppIntegrationsClient
    from mypy_boto3_appintegrations.type_defs import ListApplicationsResponseTypeDef

def list_app_integrations_applications(
    client: 'AppIntegrationsClient'
) -> 'ListApplicationsResponseTypeDef':
    """Lists existing Amazon AppIntegrations applications."""
    response = client.list_applications()
    return response

# Initialize boto3 client (runtime code)
region = os.environ.get('AWS_REGION_NAME', 'us-east-1')
appintegrations_client: 'AppIntegrationsClient' = boto3.client(
    "appintegrations",
    region_name=region
)

# Call the function with type-hinted client
try:
    applications_data = list_app_integrations_applications(appintegrations_client)
    print(f"Successfully listed applications in region {region}.")
    for app in applications_data.get('Applications', []):
        print(f"  - Application ARN: {app.get('ApplicationArn')}")
    if applications_data.get('NextToken'):
        print(f"  (More applications available. Next Token: {applications_data['NextToken']})")
except Exception as e:
    print(f"Error listing applications: {e}")

view raw JSON →