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