{"library":"mypy-boto3-sagemaker-a2i-runtime","title":"mypy-boto3-sagemaker-a2i-runtime type annotations","description":"This library provides type annotations (stubs) for the `boto3` client and resources related to the AWS SageMaker Augmented AI Runtime (A2I) service. It allows static type checkers like MyPy to validate code using `boto3` for this specific AWS service, catching potential errors before runtime. The current version is `1.42.3`, and releases are frequent, typically in sync with `boto3` updates and `mypy-boto3-builder` improvements.","language":"python","status":"active","last_verified":"Thu May 14","install":{"commands":["pip install mypy-boto3-sagemaker-a2i-runtime boto3"],"cli":null},"imports":["from mypy_boto3_sagemaker_a2i_runtime.client import AugmentedAIRuntimeClient","from mypy_boto3_sagemaker_a2i_runtime.type_defs import HumanLoopSummaryTypeDef"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import boto3\nfrom mypy_boto3_sagemaker_a2i_runtime.client import AugmentedAIRuntimeClient\nfrom mypy_boto3_sagemaker_a2i_runtime.type_defs import HumanLoopSummaryTypeDef\nimport os\n\n\ndef get_a2i_client() -> AugmentedAIRuntimeClient:\n    \"\"\"Initializes and returns a typed Sagemaker A2I Runtime client.\"\"\"\n    # Ensure AWS credentials are configured (e.g., via environment variables, ~/.aws/credentials)\n    # For local development, you might use 'aws configure'\n    # For production, consider IAM roles.\n    client: AugmentedAIRuntimeClient = boto3.client(\n        \"sagemaker-a2i-runtime\",\n        region_name=os.environ.get(\"AWS_REGION\", \"us-east-1\")\n    )\n    return client\n\n\ndef list_a2i_flow_definitions():\n    \"\"\"Lists A2I flow definitions using the typed client.\"\"\"\n    client = get_a2i_client()\n    try:\n        # MyPy will now correctly type-check the client's methods and response structure\n        response = client.list_flow_definitions(MaxResults=10)\n        flow_definitions: list[HumanLoopSummaryTypeDef] = response[\"HumanLoopSummaries\"]\n\n        print(f\"Found {len(flow_definitions)} A2I Flow Definitions:\")\n        for fd in flow_definitions:\n            print(f\"- Name: {fd['FlowDefinitionName']}, Status: {fd['FlowDefinitionStatus']}\")\n    except Exception as e:\n        print(f\"An error occurred: {e}\")\n\nif __name__ == \"__main__\":\n    list_a2i_flow_definitions()\n","lang":"python","description":"This example demonstrates how to initialize a type-hinted `boto3` client for the Sagemaker A2I Runtime service and use it to list flow definitions. MyPy will provide strong type-checking for the client methods and the structure of the API responses, leveraging the installed stubs.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-14","installed_version":"1.43.0","pypi_latest":"1.43.0","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":3.8,"avg_import_s":0.58,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"mypy-boto3-sagemaker-a2i-runtime","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.55,"mem_mb":12.6,"disk_size":"51.0M"},{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"mypy-boto3-sagemaker-a2i-runtime","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.56,"mem_mb":12.5,"disk_size":"50.9M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"mypy-boto3-sagemaker-a2i-runtime","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":4.1,"import_time_s":0.42,"mem_mb":12.6,"disk_size":"52M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"mypy-boto3-sagemaker-a2i-runtime","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.44,"mem_mb":12.5,"disk_size":"51M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"mypy-boto3-sagemaker-a2i-runtime","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.7,"mem_mb":14.4,"disk_size":"54.1M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"mypy-boto3-sagemaker-a2i-runtime","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.8,"mem_mb":14.3,"disk_size":"53.9M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"mypy-boto3-sagemaker-a2i-runtime","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":4,"import_time_s":0.67,"mem_mb":14.4,"disk_size":"55M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"mypy-boto3-sagemaker-a2i-runtime","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.66,"mem_mb":14.3,"disk_size":"54M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"mypy-boto3-sagemaker-a2i-runtime","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.6,"mem_mb":13.7,"disk_size":"45.3M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"mypy-boto3-sagemaker-a2i-runtime","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.67,"mem_mb":13.5,"disk_size":"45.2M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"mypy-boto3-sagemaker-a2i-runtime","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3.2,"import_time_s":0.62,"mem_mb":13.7,"disk_size":"46M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"mypy-boto3-sagemaker-a2i-runtime","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.71,"mem_mb":13.5,"disk_size":"46M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"mypy-boto3-sagemaker-a2i-runtime","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.61,"mem_mb":14.6,"disk_size":"45.0M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"mypy-boto3-sagemaker-a2i-runtime","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.65,"mem_mb":14.4,"disk_size":"44.8M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"mypy-boto3-sagemaker-a2i-runtime","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3,"import_time_s":0.57,"mem_mb":14.6,"disk_size":"46M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"mypy-boto3-sagemaker-a2i-runtime","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.67,"mem_mb":14.4,"disk_size":"45M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"mypy-boto3-sagemaker-a2i-runtime","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.43,"mem_mb":11.8,"disk_size":"50.4M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"mypy-boto3-sagemaker-a2i-runtime","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.48,"mem_mb":11.8,"disk_size":"50.4M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"mypy-boto3-sagemaker-a2i-runtime","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":4.6,"import_time_s":0.42,"mem_mb":11.8,"disk_size":"51M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"mypy-boto3-sagemaker-a2i-runtime","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.46,"mem_mb":11.8,"disk_size":"51M"}]}}