Examples#
Index > AugmentedAIRuntime > Examples
Auto-generated documentation for AugmentedAIRuntime type annotations stubs module mypy-boto3-sagemaker-a2i-runtime.
Client#
Implicit type annotations#
Can be used with boto3-stubs[sagemaker-a2i-runtime]
package installed.
Write your AugmentedAIRuntime
code as usual,
type checking and code completion should work out of the box.
Client method usage example#
# AugmentedAIRuntimeClient usage example
from boto3.session import Session
session = Session()
client = session.client("sagemaker-a2i-runtime") # (1)
result = client.describe_human_loop() # (2)
- client: AugmentedAIRuntimeClient
- result: DescribeHumanLoopResponseTypeDef
Paginator usage example#
# ListHumanLoopsPaginator usage example
from boto3.session import Session
session = Session()
client = session.client("sagemaker-a2i-runtime") # (1)
paginator = client.get_paginator("list_human_loops") # (2)
for item in paginator.paginate(...):
print(item) # (3)
- client: AugmentedAIRuntimeClient
- paginator: ListHumanLoopsPaginator
- item: ListHumanLoopsResponseTypeDef
Explicit type annotations#
With boto3-stubs-lite[sagemaker-a2i-runtime]
or a standalone mypy_boto3_sagemaker_a2i_runtime
package, you have to explicitly specify client: AugmentedAIRuntimeClient
type annotation.
All other type annotations are optional, as types should be discovered automatically. However, these type annotations can be helpful in your functions and methods.
Client method usage example#
# AugmentedAIRuntimeClient usage example with type annotations
from boto3.session import Session
from mypy_boto3_sagemaker_a2i_runtime.client import AugmentedAIRuntimeClient
from mypy_boto3_sagemaker_a2i_runtime.type_defs import DescribeHumanLoopResponseTypeDef
from mypy_boto3_sagemaker_a2i_runtime.type_defs import DescribeHumanLoopRequestTypeDef
session = Session()
client: AugmentedAIRuntimeClient = session.client("sagemaker-a2i-runtime")
kwargs: DescribeHumanLoopRequestTypeDef = {...}
result: DescribeHumanLoopResponseTypeDef = client.describe_human_loop(**kwargs)
Paginator usage example#
# ListHumanLoopsPaginator usage example with type annotations
from boto3.session import Session
from mypy_boto3_sagemaker_a2i_runtime.client import AugmentedAIRuntimeClient
from mypy_boto3_sagemaker_a2i_runtime.paginator import ListHumanLoopsPaginator
from mypy_boto3_sagemaker_a2i_runtime.type_defs import ListHumanLoopsResponseTypeDef
session = Session()
client: AugmentedAIRuntimeClient = session.client("sagemaker-a2i-runtime")
paginator: ListHumanLoopsPaginator = client.get_paginator("list_human_loops")
for item in paginator.paginate(...):
item: ListHumanLoopsResponseTypeDef
print(item)