Skip to content

Examples#

Index > KinesisAnalytics > Examples

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

Client#

Implicit type annotations#

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

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

# KinesisAnalyticsClient usage example

from boto3.session import Session


session = Session()

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

Explicit type annotations#

With types-boto3-lite[kinesisanalytics] or a standalone types_boto3_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 boto3.session import Session

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


session = Session()

client: KinesisAnalyticsClient = session.client("kinesisanalytics")

kwargs: CreateApplicationRequestRequestTypeDef = {...}
result: CreateApplicationResponseTypeDef = client.create_application(**kwargs)