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