Skip to content

Examples#

Index > IoTEventsData > Examples

Auto-generated documentation for IoTEventsData type annotations stubs module types-aiobotocore-iotevents-data.

Client#

Implicit type annotations#

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

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

# IoTEventsDataClient usage example

from aioboto3.session import Session


session = Session()

async with session.client("iotevents-data") as client:  # (1)
    result = await client.batch_acknowledge_alarm()  # (2)
  1. client: IoTEventsDataClient
  2. result: BatchAcknowledgeAlarmResponseTypeDef

Explicit type annotations#

With types-aioboto3-lite[iotevents-data] or a standalone types_aiobotocore_iotevents_data package, you have to explicitly specify client: IoTEventsDataClient 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.

# IoTEventsDataClient usage example with type annotations

from aioboto3.session import Session

from types_aiobotocore_iotevents_data.client import IoTEventsDataClient
from types_aiobotocore_iotevents_data.type_defs import BatchAcknowledgeAlarmResponseTypeDef
from types_aiobotocore_iotevents_data.type_defs import BatchAcknowledgeAlarmRequestRequestTypeDef


session = Session()

client: IoTEventsDataClient
async with session.client("iotevents-data") as client:  # (1)
    kwargs: BatchAcknowledgeAlarmRequestRequestTypeDef = {...}  # (2)
    result: BatchAcknowledgeAlarmResponseTypeDef = await client.batch_acknowledge_alarm(**kwargs)  # (3)
  1. client: IoTEventsDataClient
  2. kwargs: BatchAcknowledgeAlarmRequestRequestTypeDef
  3. result: BatchAcknowledgeAlarmResponseTypeDef