Skip to content

Examples#

Index > IoT1ClickProjects > Examples

Auto-generated documentation for IoT1ClickProjects type annotations stubs module mypy-boto3-iot1click-projects.

Client#

Implicit type annotations#

Can be used with boto3-stubs[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 boto3.session import Session


session = Session()

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

from boto3.session import Session


session = Session()
client = session.client("iot1click-projects")  # (1)

paginator = client.get_paginator("list_placements")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
  1. client: IoT1ClickProjectsClient
  2. paginator: ListPlacementsPaginator
  3. item: ListPlacementsResponseTypeDef

Explicit type annotations#

With boto3-stubs-lite[iot1click-projects] or a standalone mypy_boto3_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 boto3.session import Session

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


session = Session()

client: IoT1ClickProjectsClient = session.client("iot1click-projects")

kwargs: DescribePlacementRequestRequestTypeDef = {...}
result: DescribePlacementResponseTypeDef = client.describe_placement(**kwargs)
# ListPlacementsPaginator usage example with type annotations

from boto3.session import Session

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


session = Session()
client: IoT1ClickProjectsClient = session.client("iot1click-projects")

paginator: ListPlacementsPaginator = client.get_paginator("list_placements")
for item in paginator.paginate(...):
    item: ListPlacementsResponseTypeDef
    print(item)