Examples#
Index > AugmentedAIRuntime > Examples
Auto-generated documentation for AugmentedAIRuntime type annotations stubs module types-aiobotocore-sagemaker-a2i-runtime.
Client#
Implicit type annotations#
Can be used with types-aioboto3[sagemaker-a2i-runtime]
package installed.
Write your AugmentedAIRuntime
code as usual,
type checking and code completion should work out of the box.
# AugmentedAIRuntimeClient usage example
from aioboto3.session import Session
session = Session()
async with session.client("sagemaker-a2i-runtime") as client: # (1)
result = await client.describe_human_loop() # (2)
- client: AugmentedAIRuntimeClient
- result: DescribeHumanLoopResponseTypeDef
# ListHumanLoopsPaginator usage example
from aioboto3.session import Session
session = Session()
async with session.client("sagemaker-a2i-runtime") as client: # (1)
paginator = client.get_paginator("list_human_loops") # (2)
async for item in paginator.paginate(...):
print(item) # (3)
- client: AugmentedAIRuntimeClient
- paginator: ListHumanLoopsPaginator
- item: ListHumanLoopsResponseTypeDef
Explicit type annotations#
With types-aioboto3-lite[sagemaker-a2i-runtime]
or a standalone types_aiobotocore_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.
# AugmentedAIRuntimeClient usage example with type annotations
from aioboto3.session import Session
from types_aiobotocore_sagemaker_a2i_runtime.client import AugmentedAIRuntimeClient
from types_aiobotocore_sagemaker_a2i_runtime.type_defs import DescribeHumanLoopResponseTypeDef
from types_aiobotocore_sagemaker_a2i_runtime.type_defs import DescribeHumanLoopRequestRequestTypeDef
session = Session()
client: AugmentedAIRuntimeClient
async with session.client("sagemaker-a2i-runtime") as client: # (1)
kwargs: DescribeHumanLoopRequestRequestTypeDef = {...} # (2)
result: DescribeHumanLoopResponseTypeDef = await client.describe_human_loop(**kwargs) # (3)
- client: AugmentedAIRuntimeClient
- kwargs: DescribeHumanLoopRequestRequestTypeDef
- result: DescribeHumanLoopResponseTypeDef
# ListHumanLoopsPaginator usage example with type annotations
from aioboto3.session import Session
from types_aiobotocore_sagemaker_a2i_runtime.client import AugmentedAIRuntimeClient
from types_aiobotocore_sagemaker_a2i_runtime.paginator import ListHumanLoopsPaginator
from types_aiobotocore_sagemaker_a2i_runtime.type_defs import ListHumanLoopsResponseTypeDef
session = Session()
client: AugmentedAIRuntimeClient
async with session.client("sagemaker-a2i-runtime") as client: # (1)
paginator: ListHumanLoopsPaginator = client.get_paginator("list_human_loops") # (2)
async for item in paginator.paginate(...):
item: ListHumanLoopsResponseTypeDef
print(item) # (3)
- client: AugmentedAIRuntimeClient
- paginator: ListHumanLoopsPaginator
- item: ListHumanLoopsResponseTypeDef