Skip to content

Examples#

Index > IoTDeviceAdvisor > Examples

Auto-generated documentation for IoTDeviceAdvisor type annotations stubs module mypy-boto3-iotdeviceadvisor.

Client#

Implicit type annotations#

Can be used with boto3-stubs[iotdeviceadvisor] package installed.

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

Client method usage example#

# IoTDeviceAdvisorClient usage example

from boto3.session import Session


session = Session()

client = session.client("iotdeviceadvisor")  # (1)
result = client.create_suite_definition()  # (2)
  1. client: IoTDeviceAdvisorClient
  2. result: CreateSuiteDefinitionResponseTypeDef

Explicit type annotations#

With boto3-stubs-lite[iotdeviceadvisor] or a standalone mypy_boto3_iotdeviceadvisor package, you have to explicitly specify client: IoTDeviceAdvisorClient 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#

# IoTDeviceAdvisorClient usage example with type annotations

from boto3.session import Session

from mypy_boto3_iotdeviceadvisor.client import IoTDeviceAdvisorClient
from mypy_boto3_iotdeviceadvisor.type_defs import CreateSuiteDefinitionResponseTypeDef
from mypy_boto3_iotdeviceadvisor.type_defs import CreateSuiteDefinitionRequestTypeDef


session = Session()

client: IoTDeviceAdvisorClient = session.client("iotdeviceadvisor")

kwargs: CreateSuiteDefinitionRequestTypeDef = {...}
result: CreateSuiteDefinitionResponseTypeDef = client.create_suite_definition(**kwargs)