Registry / type-stubs / mypy-boto3-sagemaker-a2i-runtime

mypy-boto3-sagemaker-a2i-runtime

JSON →
library1.43.0pypypi✓ verified 23d ago

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.

pip install mypy-boto3-sagemaker-a2i-runtime boto3
INSTALL
IMPORT
SIG · MYPY-BOTO3-SAGEMAK
M
mypy-boto3-sagemaker-a2i-runtime
type-stubspythonv1.43.0
Install
3.9s avg
Import
565ms
Disk
50MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.578s · 51.8MB
glibc
py 3.103.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.
fix
Upgrade 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.
fix
Ensure `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.
fix
Keep `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.
Agent activity
21 hits · last 30 days
node
18
OpenAI (training)
2
Resources
mypy-boto3-sagemaker-a2i-runtime — pip install mypy-boto3-sagemaker-a2i-runtime · libregistry