Skip to content

Examples#

Index > CleanRoomsService > Examples

Auto-generated documentation for CleanRoomsService type annotations stubs module types-boto3-cleanrooms.

Client#

Implicit type annotations#

Can be used with types-boto3[cleanrooms] package installed.

Write your CleanRoomsService code as usual, type checking and code completion should work out of the box.

Client method usage example#

# CleanRoomsServiceClient usage example

from boto3.session import Session


session = Session()

client = session.client("cleanrooms")  # (1)
result = client.batch_get_collaboration_analysis_template()  # (2)
  1. client: CleanRoomsServiceClient
  2. result: BatchGetCollaborationAnalysisTemplateOutputTypeDef

Paginator usage example#

# ListAnalysisTemplatesPaginator usage example

from boto3.session import Session


session = Session()
client = session.client("cleanrooms")  # (1)

paginator = client.get_paginator("list_analysis_templates")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
  1. client: CleanRoomsServiceClient
  2. paginator: ListAnalysisTemplatesPaginator
  3. item: ListAnalysisTemplatesOutputTypeDef

Explicit type annotations#

With types-boto3-lite[cleanrooms] or a standalone types_boto3_cleanrooms package, you have to explicitly specify client: CleanRoomsServiceClient 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#

# CleanRoomsServiceClient usage example with type annotations

from boto3.session import Session

from types_boto3_cleanrooms.client import CleanRoomsServiceClient
from types_boto3_cleanrooms.type_defs import BatchGetCollaborationAnalysisTemplateOutputTypeDef
from types_boto3_cleanrooms.type_defs import BatchGetCollaborationAnalysisTemplateInputTypeDef


session = Session()

client: CleanRoomsServiceClient = session.client("cleanrooms")

kwargs: BatchGetCollaborationAnalysisTemplateInputTypeDef = {...}
result: BatchGetCollaborationAnalysisTemplateOutputTypeDef = client.batch_get_collaboration_analysis_template(**kwargs)

Paginator usage example#

# ListAnalysisTemplatesPaginator usage example with type annotations

from boto3.session import Session

from types_boto3_cleanrooms.client import CleanRoomsServiceClient
from types_boto3_cleanrooms.paginator import ListAnalysisTemplatesPaginator
from types_boto3_cleanrooms.type_defs import ListAnalysisTemplatesOutputTypeDef


session = Session()
client: CleanRoomsServiceClient = session.client("cleanrooms")

paginator: ListAnalysisTemplatesPaginator = client.get_paginator("list_analysis_templates")
for item in paginator.paginate(...):
    item: ListAnalysisTemplatesOutputTypeDef
    print(item)