Skip to content

Examples#

Index > Ivschat > Examples

Auto-generated documentation for Ivschat type annotations stubs module mypy-boto3-ivschat.

Client#

Implicit type annotations#

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

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

Client method usage example#

# IvschatClient usage example

from boto3.session import Session


session = Session()

client = session.client("ivschat")  # (1)
result = client.create_chat_token()  # (2)
  1. client: IvschatClient
  2. result: CreateChatTokenResponseTypeDef

Explicit type annotations#

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

# IvschatClient usage example with type annotations

from boto3.session import Session

from mypy_boto3_ivschat.client import IvschatClient
from mypy_boto3_ivschat.type_defs import CreateChatTokenResponseTypeDef
from mypy_boto3_ivschat.type_defs import CreateChatTokenRequestTypeDef


session = Session()

client: IvschatClient = session.client("ivschat")

kwargs: CreateChatTokenRequestTypeDef = {...}
result: CreateChatTokenResponseTypeDef = client.create_chat_token(**kwargs)