mypy-boto3-appfabric

1.42.3 · active · verified Sat Apr 11

mypy-boto3-appfabric provides type annotations for the boto3 AppFabric service, enabling static type checking for your AWS interactions. It is part of the larger mypy-boto3 project, generated by mypy-boto3-builder 8.12.0, and releases frequently to keep pace with new boto3 versions and services.

Warnings

Install

Imports

Quickstart

Demonstrates how to import the AppFabricClient type and use it to type-hint a boto3 client instance, enabling autocompletion and static analysis.

import boto3
from mypy_boto3_appfabric.client import AppFabricClient
from os import environ


def get_appfabric_client() -> AppFabricClient:
    # Ensure boto3 is configured, e.g., via AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION_NAME env vars
    client: AppFabricClient = boto3.client(
        "appfabric",
        region_name=environ.get('AWS_REGION_NAME', 'us-east-1')
    )
    return client


if __name__ == "__main__":
    appfabric_client = get_appfabric_client()
    print(f"AppFabric client created: {appfabric_client}")
    # Example: List app bundles (replace with actual AppFabric operation)
    try:
        response = appfabric_client.list_app_bundles()
        print(f"Successfully listed app bundles: {len(response.get('appBundleList', []))}")
    except Exception as e:
        print(f"Error listing app bundles: {e}")

view raw JSON →