Skip to content

Examples#

Index > IoT1ClickProjects > Examples

Auto-generated documentation for IoT1ClickProjects type annotations stubs module types-aiobotocore-iot1click-projects.

Client#

Implicit type annotations#

Can be used with types-aiobotocore[iot1click-projects] package installed.

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

# IoT1ClickProjectsClient usage example

from aiobotocore.session import get_session


session = get_session()

async with session.create_client("iot1click-projects") as client:  # (1)
    result = await client.describe_placement()  # (2)
  1. client: IoT1ClickProjectsClient
  2. result: DescribePlacementResponseTypeDef
# ListPlacementsPaginator usage example

from aiobotocore.session import get_session


session = get_session()

async with session.create_client("iot1click-projects") as client:  # (1)
    paginator = client.get_paginator("list_placements")  # (2)
    async for item in paginator.paginate(...):
        print(item)  # (3)
  1. client: IoT1ClickProjectsClient
  2. paginator: ListPlacementsPaginator
  3. item: ListPlacementsResponseTypeDef

Explicit type annotations#

With types-aiobotocore-lite[iot1click-projects] or a standalone types_aiobotocore_iot1click_projects package, you have to explicitly specify client: IoT1ClickProjectsClient 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.

# IoT1ClickProjectsClient usage example with type annotations

from aiobotocore.session import get_session

from types_aiobotocore_iot1click_projects.client import IoT1ClickProjectsClient
from types_aiobotocore_iot1click_projects.type_defs import DescribePlacementResponseTypeDef
from types_aiobotocore_iot1click_projects.type_defs import DescribePlacementRequestRequestTypeDef


session = get_session()

async with session.create_client("iot1click-projects") as client:
    client: IoT1ClickProjectsClient
    kwargs: DescribePlacementRequestRequestTypeDef = {...}
    result: DescribePlacementResponseTypeDef = await client.describe_placement(**kwargs)
# ListPlacementsPaginator usage example with type annotations

from aiobotocore.session import get_session

from types_aiobotocore_iot1click_projects.client import IoT1ClickProjectsClient
from types_aiobotocore_iot1click_projects.paginator import ListPlacementsPaginator
from types_aiobotocore_iot1click_projects.type_defs import ListPlacementsResponseTypeDef


session = get_session()

async with session.create_client("iot1click-projects") as client:
    client: IoT1ClickProjectsClient
    paginator: ListPlacementsPaginator = client.get_paginator("list_placements")
    async for item in paginator.paginate(...):
        item: ListPlacementsResponseTypeDef
        print(item)