Skip to content

Examples#

Index > QuickSight > Examples

Auto-generated documentation for QuickSight type annotations stubs module mypy-boto3-quicksight.

Client#

Implicit type annotations#

Can be used with boto3-stubs[quicksight] package installed.

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

Client method usage example#

# QuickSightClient usage example

from boto3.session import Session


session = Session()

client = session.client("quicksight")  # (1)
result = client.batch_create_topic_reviewed_answer()  # (2)
  1. client: QuickSightClient
  2. result: BatchCreateTopicReviewedAnswerResponseTypeDef

Paginator usage example#

# DescribeFolderPermissionsPaginator usage example

from boto3.session import Session


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

paginator = client.get_paginator("describe_folder_permissions")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
  1. client: QuickSightClient
  2. paginator: DescribeFolderPermissionsPaginator
  3. item: DescribeFolderPermissionsResponseTypeDef

Explicit type annotations#

With boto3-stubs-lite[quicksight] or a standalone mypy_boto3_quicksight package, you have to explicitly specify client: QuickSightClient 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.

Client method usage example#

# QuickSightClient usage example with type annotations

from boto3.session import Session

from mypy_boto3_quicksight.client import QuickSightClient
from mypy_boto3_quicksight.type_defs import BatchCreateTopicReviewedAnswerResponseTypeDef
from mypy_boto3_quicksight.type_defs import BatchCreateTopicReviewedAnswerRequestTypeDef


session = Session()

client: QuickSightClient = session.client("quicksight")

kwargs: BatchCreateTopicReviewedAnswerRequestTypeDef = {...}
result: BatchCreateTopicReviewedAnswerResponseTypeDef = client.batch_create_topic_reviewed_answer(**kwargs)

Paginator usage example#

# DescribeFolderPermissionsPaginator usage example with type annotations

from boto3.session import Session

from mypy_boto3_quicksight.client import QuickSightClient
from mypy_boto3_quicksight.paginator import DescribeFolderPermissionsPaginator
from mypy_boto3_quicksight.type_defs import DescribeFolderPermissionsResponseTypeDef


session = Session()
client: QuickSightClient = session.client("quicksight")

paginator: DescribeFolderPermissionsPaginator = client.get_paginator("describe_folder_permissions")
for item in paginator.paginate(...):
    item: DescribeFolderPermissionsResponseTypeDef
    print(item)