Skip to content

Examples#

Index > CleanRoomsService > Examples

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

Client#

Implicit type annotations#

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

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

# CleanRoomsServiceClient usage example

from aioboto3.session import Session


session = Session()

async with session.client("cleanrooms") as client:  # (1)
    result = await client.batch_get_collaboration_analysis_template()  # (2)
  1. client: CleanRoomsServiceClient
  2. result: BatchGetCollaborationAnalysisTemplateOutputTypeDef
# ListAnalysisTemplatesPaginator usage example

from aioboto3.session import Session


session = Session()

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

Explicit type annotations#

With types-aioboto3-lite[cleanrooms] or a standalone types_aiobotocore_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.

# CleanRoomsServiceClient usage example with type annotations

from aioboto3.session import Session

from types_aiobotocore_cleanrooms.client import CleanRoomsServiceClient
from types_aiobotocore_cleanrooms.type_defs import BatchGetCollaborationAnalysisTemplateOutputTypeDef
from types_aiobotocore_cleanrooms.type_defs import BatchGetCollaborationAnalysisTemplateInputRequestTypeDef


session = Session()

client: CleanRoomsServiceClient
async with session.client("cleanrooms") as client:  # (1)
    kwargs: BatchGetCollaborationAnalysisTemplateInputRequestTypeDef = {...}  # (2)
    result: BatchGetCollaborationAnalysisTemplateOutputTypeDef = await client.batch_get_collaboration_analysis_template(**kwargs)  # (3)
  1. client: CleanRoomsServiceClient
  2. kwargs: BatchGetCollaborationAnalysisTemplateInputRequestTypeDef
  3. result: BatchGetCollaborationAnalysisTemplateOutputTypeDef
# ListAnalysisTemplatesPaginator usage example with type annotations

from aioboto3.session import Session

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


session = Session()

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