Examples#
Index > CleanRoomsML > Examples
Auto-generated documentation for CleanRoomsML type annotations stubs module types-boto3-cleanroomsml.
Client#
Implicit type annotations#
Can be used with types-boto3[cleanroomsml]
package installed.
Write your CleanRoomsML
code as usual,
type checking and code completion should work out of the box.
Client method usage example#
# CleanRoomsMLClient usage example
from boto3.session import Session
session = Session()
client = session.client("cleanroomsml") # (1)
result = client.cancel_trained_model() # (2)
- client: CleanRoomsMLClient
- result: EmptyResponseMetadataTypeDef
Paginator usage example#
# ListAudienceExportJobsPaginator usage example
from boto3.session import Session
session = Session()
client = session.client("cleanroomsml") # (1)
paginator = client.get_paginator("list_audience_export_jobs") # (2)
for item in paginator.paginate(...):
print(item) # (3)
- client: CleanRoomsMLClient
- paginator: ListAudienceExportJobsPaginator
- item: ListAudienceExportJobsResponseTypeDef
Explicit type annotations#
With types-boto3-lite[cleanroomsml]
or a standalone types_boto3_cleanroomsml
package, you have to explicitly specify client: CleanRoomsMLClient
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#
# CleanRoomsMLClient usage example with type annotations
from boto3.session import Session
from types_boto3_cleanroomsml.client import CleanRoomsMLClient
from types_boto3_cleanroomsml.type_defs import EmptyResponseMetadataTypeDef
from types_boto3_cleanroomsml.type_defs import CancelTrainedModelRequestTypeDef
session = Session()
client: CleanRoomsMLClient = session.client("cleanroomsml")
kwargs: CancelTrainedModelRequestTypeDef = {...}
result: EmptyResponseMetadataTypeDef = client.cancel_trained_model(**kwargs)
Paginator usage example#
# ListAudienceExportJobsPaginator usage example with type annotations
from boto3.session import Session
from types_boto3_cleanroomsml.client import CleanRoomsMLClient
from types_boto3_cleanroomsml.paginator import ListAudienceExportJobsPaginator
from types_boto3_cleanroomsml.type_defs import ListAudienceExportJobsResponseTypeDef
session = Session()
client: CleanRoomsMLClient = session.client("cleanroomsml")
paginator: ListAudienceExportJobsPaginator = client.get_paginator("list_audience_export_jobs")
for item in paginator.paginate(...):
item: ListAudienceExportJobsResponseTypeDef
print(item)