Examples#
Auto-generated documentation for QConnect type annotations stubs module types-boto3-qconnect.
Client#
Implicit type annotations#
Can be used with types-boto3[qconnect]
package installed.
Write your QConnect
code as usual,
type checking and code completion should work out of the box.
# QConnectClient usage example
from boto3.session import Session
session = Session()
client = session.client("qconnect") # (1)
result = client.activate_message_template() # (2)
- client: QConnectClient
- result: ActivateMessageTemplateResponseTypeDef
# ListAIAgentVersionsPaginator usage example
from boto3.session import Session
session = Session()
client = session.client("qconnect") # (1)
paginator = client.get_paginator("list_ai_agent_versions") # (2)
for item in paginator.paginate(...):
print(item) # (3)
- client: QConnectClient
- paginator: ListAIAgentVersionsPaginator
- item: ListAIAgentVersionsResponseTypeDef
Explicit type annotations#
With types-boto3-lite[qconnect]
or a standalone types_boto3_qconnect
package, you have to explicitly specify client: QConnectClient
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.
# QConnectClient usage example with type annotations
from boto3.session import Session
from types_boto3_qconnect.client import QConnectClient
from types_boto3_qconnect.type_defs import ActivateMessageTemplateResponseTypeDef
from types_boto3_qconnect.type_defs import ActivateMessageTemplateRequestRequestTypeDef
session = Session()
client: QConnectClient = session.client("qconnect")
kwargs: ActivateMessageTemplateRequestRequestTypeDef = {...}
result: ActivateMessageTemplateResponseTypeDef = client.activate_message_template(**kwargs)
# ListAIAgentVersionsPaginator usage example with type annotations
from boto3.session import Session
from types_boto3_qconnect.client import QConnectClient
from types_boto3_qconnect.paginator import ListAIAgentVersionsPaginator
from types_boto3_qconnect.type_defs import ListAIAgentVersionsResponseTypeDef
session = Session()
client: QConnectClient = session.client("qconnect")
paginator: ListAIAgentVersionsPaginator = client.get_paginator("list_ai_agent_versions")
for item in paginator.paginate(...):
item: ListAIAgentVersionsResponseTypeDef
print(item)