Registry /
type-stubs / mypy-boto3-sagemaker-a2i-runtime
Install & Compatibility
Where this runs
tested against v1.43.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.578s · 51.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.9s · import 0.552s · 52MB
50MB installed
● package 50MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
AugmentedAIRuntimeClient
✓ from mypy_boto3_sagemaker_a2i_runtime.client import AugmentedAIRuntimeClient
HumanLoopSummaryTypeDef
✓ from mypy_boto3_sagemaker_a2i_runtime.type_defs import HumanLoopSummaryTypeDef
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.
import boto3
from mypy_boto3_sagemaker_a2i_runtime.client import AugmentedAIRuntimeClient
from mypy_boto3_sagemaker_a2i_runtime.type_defs import HumanLoopSummaryTypeDef
import os
def get_a2i_client() -> AugmentedAIRuntimeClient:
"""Initializes and returns a typed Sagemaker A2I Runtime client."""
# Ensure AWS credentials are configured (e.g., via environment variables, ~/.aws/credentials)
# For local development, you might use 'aws configure'
# For production, consider IAM roles.
client: AugmentedAIRuntimeClient = boto3.client(
"sagemaker-a2i-runtime",
region_name=os.environ.get("AWS_REGION", "us-east-1")
)
return client
def list_a2i_flow_definitions():
"""Lists A2I flow definitions using the typed client."""
client = get_a2i_client()
try:
# MyPy will now correctly type-check the client's methods and response structure
response = client.list_flow_definitions(MaxResults=10)
flow_definitions: list[HumanLoopSummaryTypeDef] = response["HumanLoopSummaries"]
print(f"Found {len(flow_definitions)} A2I Flow Definitions:")
for fd in flow_definitions:
print(f"- Name: {fd['FlowDefinitionName']}, Status: {fd['FlowDefinitionStatus']}")
except Exception as e:
print(f"An error occurred: {e}")
if __name__ == "__main__":
list_a2i_flow_definitions()
Debug
Known issues
breakingPython 3.8 support was removed starting from `mypy-boto3-builder` version 8.12.0. This means `mypy-boto3-sagemaker-a2i-runtime` versions built with 8.12.0 or newer (like 1.42.3) require Python 3.9 or higher.fixUpgrade your Python environment to 3.9 or newer.
affects: mypy-boto3-builder >=8.12.0, mypy-boto3-* >=1.42.3
gotchaThis package (`mypy-boto3-sagemaker-a2i-runtime`) provides *only* type stubs. You must install `boto3` separately for your code to run successfully at runtime. The stubs have no runtime effect on `boto3` itself.fixEnsure `boto3` is installed alongside this stub package (e.g., `pip install boto3 mypy-boto3-sagemaker-a2i-runtime`).
affects: All versions
gotchaFor optimal type-checking accuracy, ensure the `mypy-boto3-sagemaker-a2i-runtime` version matches your `boto3` library version as closely as possible. Significant version mismatches can lead to incorrect type hints or unresolved names.fixKeep `mypy-boto3-sagemaker-a2i-runtime` and `boto3` synchronized. For example, if `boto3` is `1.42.x`, install `mypy-boto3-sagemaker-a2i-runtime==1.42.*`.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredProvides the actual runtime functionality; this package only offers type stubs.
typing-extensionsoptionalRequired for backporting new typing features to older Python versions, though typically handled by the package's dependency resolution.