Skip to content

Examples#

Index > ConnectWisdomService > Examples

Auto-generated documentation for ConnectWisdomService type annotations stubs module types-boto3-wisdom.

Client#

Implicit type annotations#

Can be used with types-boto3[wisdom] package installed.

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

# ConnectWisdomServiceClient usage example

from boto3.session import Session


session = Session()

client = session.client("wisdom")  # (1)
result = client.create_assistant()  # (2)
  1. client: ConnectWisdomServiceClient
  2. result: CreateAssistantResponseTypeDef
# ListAssistantAssociationsPaginator usage example

from boto3.session import Session


session = Session()
client = session.client("wisdom")  # (1)

paginator = client.get_paginator("list_assistant_associations")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
  1. client: ConnectWisdomServiceClient
  2. paginator: ListAssistantAssociationsPaginator
  3. item: ListAssistantAssociationsResponseTypeDef

Explicit type annotations#

With types-boto3-lite[wisdom] or a standalone types_boto3_wisdom package, you have to explicitly specify client: ConnectWisdomServiceClient 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.

# ConnectWisdomServiceClient usage example with type annotations

from boto3.session import Session

from types_boto3_wisdom.client import ConnectWisdomServiceClient
from types_boto3_wisdom.type_defs import CreateAssistantResponseTypeDef
from types_boto3_wisdom.type_defs import CreateAssistantRequestRequestTypeDef


session = Session()

client: ConnectWisdomServiceClient = session.client("wisdom")

kwargs: CreateAssistantRequestRequestTypeDef = {...}
result: CreateAssistantResponseTypeDef = client.create_assistant(**kwargs)
# ListAssistantAssociationsPaginator usage example with type annotations

from boto3.session import Session

from types_boto3_wisdom.client import ConnectWisdomServiceClient
from types_boto3_wisdom.paginator import ListAssistantAssociationsPaginator
from types_boto3_wisdom.type_defs import ListAssistantAssociationsResponseTypeDef


session = Session()
client: ConnectWisdomServiceClient = session.client("wisdom")

paginator: ListAssistantAssociationsPaginator = client.get_paginator("list_assistant_associations")
for item in paginator.paginate(...):
    item: ListAssistantAssociationsResponseTypeDef
    print(item)