Skip to content

Examples#

Index > KinesisAnalytics > Examples

Auto-generated documentation for KinesisAnalytics type annotations stubs module types-aiobotocore-kinesisanalytics.

Client#

Implicit type annotations#

Can be used with types-aioboto3[kinesisanalytics] package installed.

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

# KinesisAnalyticsClient usage example

from aioboto3.session import Session


session = Session()

async with session.client("kinesisanalytics") as client:  # (1)
    result = await client.create_application()  # (2)
  1. client: KinesisAnalyticsClient
  2. result: CreateApplicationResponseTypeDef

Explicit type annotations#

With types-aioboto3-lite[kinesisanalytics] or a standalone types_aiobotocore_kinesisanalytics package, you have to explicitly specify client: KinesisAnalyticsClient 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.

# KinesisAnalyticsClient usage example with type annotations

from aioboto3.session import Session

from types_aiobotocore_kinesisanalytics.client import KinesisAnalyticsClient
from types_aiobotocore_kinesisanalytics.type_defs import CreateApplicationResponseTypeDef
from types_aiobotocore_kinesisanalytics.type_defs import CreateApplicationRequestRequestTypeDef


session = Session()

client: KinesisAnalyticsClient
async with session.client("kinesisanalytics") as client:  # (1)
    kwargs: CreateApplicationRequestRequestTypeDef = {...}  # (2)
    result: CreateApplicationResponseTypeDef = await client.create_application(**kwargs)  # (3)
  1. client: KinesisAnalyticsClient
  2. kwargs: CreateApplicationRequestRequestTypeDef
  3. result: CreateApplicationResponseTypeDef