Examples#
Index > IoT1ClickDevicesService > Examples
Auto-generated documentation for IoT1ClickDevicesService type annotations stubs module types-boto3-iot1click-devices.
Client#
Implicit type annotations#
Can be used with types-boto3[iot1click-devices]
package installed.
Write your IoT1ClickDevicesService
code as usual,
type checking and code completion should work out of the box.
# IoT1ClickDevicesServiceClient usage example
from boto3.session import Session
session = Session()
client = session.client("iot1click-devices") # (1)
result = client.claim_devices_by_claim_code() # (2)
- client: IoT1ClickDevicesServiceClient
- result: ClaimDevicesByClaimCodeResponseTypeDef
# ListDeviceEventsPaginator usage example
from boto3.session import Session
session = Session()
client = session.client("iot1click-devices") # (1)
paginator = client.get_paginator("list_device_events") # (2)
for item in paginator.paginate(...):
print(item) # (3)
- client: IoT1ClickDevicesServiceClient
- paginator: ListDeviceEventsPaginator
- item: ListDeviceEventsResponseTypeDef
Explicit type annotations#
With types-boto3-lite[iot1click-devices]
or a standalone types_boto3_iot1click_devices
package, you have to explicitly specify client: IoT1ClickDevicesServiceClient
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.
# IoT1ClickDevicesServiceClient usage example with type annotations
from boto3.session import Session
from types_boto3_iot1click_devices.client import IoT1ClickDevicesServiceClient
from types_boto3_iot1click_devices.type_defs import ClaimDevicesByClaimCodeResponseTypeDef
from types_boto3_iot1click_devices.type_defs import ClaimDevicesByClaimCodeRequestRequestTypeDef
session = Session()
client: IoT1ClickDevicesServiceClient = session.client("iot1click-devices")
kwargs: ClaimDevicesByClaimCodeRequestRequestTypeDef = {...}
result: ClaimDevicesByClaimCodeResponseTypeDef = client.claim_devices_by_claim_code(**kwargs)
# ListDeviceEventsPaginator usage example with type annotations
from boto3.session import Session
from types_boto3_iot1click_devices.client import IoT1ClickDevicesServiceClient
from types_boto3_iot1click_devices.paginator import ListDeviceEventsPaginator
from types_boto3_iot1click_devices.type_defs import ListDeviceEventsResponseTypeDef
session = Session()
client: IoT1ClickDevicesServiceClient = session.client("iot1click-devices")
paginator: ListDeviceEventsPaginator = client.get_paginator("list_device_events")
for item in paginator.paginate(...):
item: ListDeviceEventsResponseTypeDef
print(item)