Skip to content


Index > Chatbot > Examples

Auto-generated documentation for Chatbot type annotations stubs module mypy-boto3-chatbot.


Implicit type annotations#

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

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

# ChatbotClient usage example

from boto3.session import Session

session = Session()

client = session.client("chatbot")  # (1)
result = client.create_chime_webhook_configuration()  # (2)
  1. client: ChatbotClient
  2. result: CreateChimeWebhookConfigurationResultTypeDef

Explicit type annotations#

With boto3-stubs-lite[chatbot] or a standalone mypy_boto3_chatbot package, you have to explicitly specify client: ChatbotClient 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.

# ChatbotClient usage example with type annotations

from boto3.session import Session

from mypy_boto3_chatbot.client import ChatbotClient
from mypy_boto3_chatbot.type_defs import CreateChimeWebhookConfigurationResultTypeDef
from mypy_boto3_chatbot.type_defs import CreateChimeWebhookConfigurationRequestRequestTypeDef

session = Session()

client: ChatbotClient = session.client("chatbot")

kwargs: CreateChimeWebhookConfigurationRequestRequestTypeDef = {...}
result: CreateChimeWebhookConfigurationResultTypeDef = client.create_chime_webhook_configuration(**kwargs)