Skip to content

Examples#

Index > IoTFleetHub > Examples

Auto-generated documentation for IoTFleetHub type annotations stubs module types-boto3-iotfleethub.

Client#

Implicit type annotations#

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

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

Client method usage example#

# IoTFleetHubClient usage example

from boto3.session import Session


session = Session()

client = session.client("iotfleethub")  # (1)
result = client.create_application()  # (2)
  1. client: IoTFleetHubClient
  2. result: CreateApplicationResponseTypeDef

Paginator usage example#

# ListApplicationsPaginator usage example

from boto3.session import Session


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

paginator = client.get_paginator("list_applications")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
  1. client: IoTFleetHubClient
  2. paginator: ListApplicationsPaginator
  3. item: ListApplicationsResponseTypeDef

Explicit type annotations#

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

# IoTFleetHubClient usage example with type annotations

from boto3.session import Session

from types_boto3_iotfleethub.client import IoTFleetHubClient
from types_boto3_iotfleethub.type_defs import CreateApplicationResponseTypeDef
from types_boto3_iotfleethub.type_defs import CreateApplicationRequestTypeDef


session = Session()

client: IoTFleetHubClient = session.client("iotfleethub")

kwargs: CreateApplicationRequestTypeDef = {...}
result: CreateApplicationResponseTypeDef = client.create_application(**kwargs)

Paginator usage example#

# ListApplicationsPaginator usage example with type annotations

from boto3.session import Session

from types_boto3_iotfleethub.client import IoTFleetHubClient
from types_boto3_iotfleethub.paginator import ListApplicationsPaginator
from types_boto3_iotfleethub.type_defs import ListApplicationsResponseTypeDef


session = Session()
client: IoTFleetHubClient = session.client("iotfleethub")

paginator: ListApplicationsPaginator = client.get_paginator("list_applications")
for item in paginator.paginate(...):
    item: ListApplicationsResponseTypeDef
    print(item)