Skip to content

Examples#

Index > QApps > Examples

Auto-generated documentation for QApps type annotations stubs module types-boto3-qapps.

Client#

Implicit type annotations#

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

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

# QAppsClient usage example

from boto3.session import Session


session = Session()

client = session.client("qapps")  # (1)
result = client.associate_library_item_review()  # (2)
  1. client: QAppsClient
  2. result: EmptyResponseMetadataTypeDef
# ListLibraryItemsPaginator usage example

from boto3.session import Session


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

paginator = client.get_paginator("list_library_items")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
  1. client: QAppsClient
  2. paginator: ListLibraryItemsPaginator
  3. item: ListLibraryItemsOutputTypeDef

Explicit type annotations#

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

# QAppsClient usage example with type annotations

from boto3.session import Session

from types_boto3_qapps.client import QAppsClient
from types_boto3_qapps.type_defs import EmptyResponseMetadataTypeDef
from types_boto3_qapps.type_defs import AssociateLibraryItemReviewInputRequestTypeDef


session = Session()

client: QAppsClient = session.client("qapps")

kwargs: AssociateLibraryItemReviewInputRequestTypeDef = {...}
result: EmptyResponseMetadataTypeDef = client.associate_library_item_review(**kwargs)
# ListLibraryItemsPaginator usage example with type annotations

from boto3.session import Session

from types_boto3_qapps.client import QAppsClient
from types_boto3_qapps.paginator import ListLibraryItemsPaginator
from types_boto3_qapps.type_defs import ListLibraryItemsOutputTypeDef


session = Session()
client: QAppsClient = session.client("qapps")

paginator: ListLibraryItemsPaginator = client.get_paginator("list_library_items")
for item in paginator.paginate(...):
    item: ListLibraryItemsOutputTypeDef
    print(item)