Examples#
Index > ChimeSDKMessaging > Examples
Auto-generated documentation for ChimeSDKMessaging type annotations stubs module mypy-boto3-chime-sdk-messaging.
Client#
Implicit type annotations#
Can be used with boto3-stubs[chime-sdk-messaging]
package installed.
Write your ChimeSDKMessaging
code as usual,
type checking and code completion should work out of the box.
Client method usage example#
# ChimeSDKMessagingClient usage example
from boto3.session import Session
session = Session()
client = session.client("chime-sdk-messaging") # (1)
result = client.associate_channel_flow() # (2)
- client: ChimeSDKMessagingClient
- result: EmptyResponseMetadataTypeDef
Explicit type annotations#
With boto3-stubs-lite[chime-sdk-messaging]
or a standalone mypy_boto3_chime_sdk_messaging
package, you have to explicitly specify client: ChimeSDKMessagingClient
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#
# ChimeSDKMessagingClient usage example with type annotations
from boto3.session import Session
from mypy_boto3_chime_sdk_messaging.client import ChimeSDKMessagingClient
from mypy_boto3_chime_sdk_messaging.type_defs import EmptyResponseMetadataTypeDef
from mypy_boto3_chime_sdk_messaging.type_defs import AssociateChannelFlowRequestTypeDef
session = Session()
client: ChimeSDKMessagingClient = session.client("chime-sdk-messaging")
kwargs: AssociateChannelFlowRequestTypeDef = {...}
result: EmptyResponseMetadataTypeDef = client.associate_channel_flow(**kwargs)