Examples
Auto-generated documentation for IoTEvents type annotations stubs module types-aiobotocore-iotevents.
Client
Implicit type annotations
Can be used with types-aioboto3[iotevents]
package installed.
Write your IoTEvents
code as usual,
type checking and code completion should work out of the box.
Client usage example
from aioboto3.session import Session
session = Session()
async with session.client("iotevents") as client: # (1)
result = await client.create_alarm_model() # (2)
- client: IoTEventsClient
- result: CreateAlarmModelResponseTypeDef
Explicit type annotations
With types-aioboto3-lite[iotevents]
or a standalone types_aiobotocore_iotevents
package, you have to explicitly specify
client: IoTEventsClient
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 usage example
from aioboto3.session import Session
from types_aiobotocore_iotevents.client import IoTEventsClient
from types_aiobotocore_iotevents.type_defs import CreateAlarmModelResponseTypeDef
from types_aiobotocore_iotevents.type_defs import CreateAlarmModelRequestRequestTypeDef
session = Session()
client: IoTEventsClient
async with session.client("iotevents") as client: # (1)
kwargs: CreateAlarmModelRequestRequestTypeDef = {...} # (2)
result: CreateAlarmModelResponseTypeDef = await client.create_alarm_model(**kwargs) # (3)
- client: IoTEventsClient
- kwargs: CreateAlarmModelRequestRequestTypeDef
- result: CreateAlarmModelResponseTypeDef