Skip to content

Examples#

Index > QuickSight > Examples

Auto-generated documentation for QuickSight type annotations stubs module types-aiobotocore-quicksight.

Client#

Implicit type annotations#

Can be used with types-aiobotocore[quicksight] package installed.

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

# QuickSightClient usage example

from aiobotocore.session import get_session


session = get_session()

async with session.create_client("quicksight") as client:  # (1)
    result = await client.cancel_ingestion()  # (2)
  1. client: QuickSightClient
  2. result: CancelIngestionResponseTypeDef
# ListAnalysesPaginator usage example

from aiobotocore.session import get_session


session = get_session()

async with session.create_client("quicksight") as client:  # (1)
    paginator = client.get_paginator("list_analyses")  # (2)
    async for item in paginator.paginate(...):
        print(item)  # (3)
  1. client: QuickSightClient
  2. paginator: ListAnalysesPaginator
  3. item: ListAnalysesResponseTypeDef

Explicit type annotations#

With types-aiobotocore-lite[quicksight] or a standalone types_aiobotocore_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.

# QuickSightClient usage example with type annotations

from aiobotocore.session import get_session

from types_aiobotocore_quicksight.client import QuickSightClient
from types_aiobotocore_quicksight.type_defs import CancelIngestionResponseTypeDef
from types_aiobotocore_quicksight.type_defs import CancelIngestionRequestRequestTypeDef


session = get_session()

async with session.create_client("quicksight") as client:
    client: QuickSightClient
    kwargs: CancelIngestionRequestRequestTypeDef = {...}
    result: CancelIngestionResponseTypeDef = await client.cancel_ingestion(**kwargs)
# ListAnalysesPaginator usage example with type annotations

from aiobotocore.session import get_session

from types_aiobotocore_quicksight.client import QuickSightClient
from types_aiobotocore_quicksight.paginator import ListAnalysesPaginator
from types_aiobotocore_quicksight.type_defs import ListAnalysesResponseTypeDef


session = get_session()

async with session.create_client("quicksight") as client:
    client: QuickSightClient
    paginator: ListAnalysesPaginator = client.get_paginator("list_analyses")
    async for item in paginator.paginate(...):
        item: ListAnalysesResponseTypeDef
        print(item)