Examples#
Index > KinesisAnalyticsV2 > Examples
Auto-generated documentation for KinesisAnalyticsV2 type annotations stubs module mypy-boto3-kinesisanalyticsv2.
Client#
Implicit type annotations#
Can be used with boto3-stubs[kinesisanalyticsv2]
package installed.
Write your KinesisAnalyticsV2
code as usual,
type checking and code completion should work out of the box.
# KinesisAnalyticsV2Client usage example
from boto3.session import Session
session = Session()
client = session.client("kinesisanalyticsv2") # (1)
result = client.add_application_cloud_watch_logging_option() # (2)
# ListApplicationOperationsPaginator usage example
from boto3.session import Session
session = Session()
client = session.client("kinesisanalyticsv2") # (1)
paginator = client.get_paginator("list_application_operations") # (2)
for item in paginator.paginate(...):
print(item) # (3)
- client: KinesisAnalyticsV2Client
- paginator: ListApplicationOperationsPaginator
- item: ListApplicationOperationsResponseTypeDef
Explicit type annotations#
With boto3-stubs-lite[kinesisanalyticsv2]
or a standalone mypy_boto3_kinesisanalyticsv2
package, you have to explicitly specify client: KinesisAnalyticsV2Client
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.
# KinesisAnalyticsV2Client usage example with type annotations
from boto3.session import Session
from mypy_boto3_kinesisanalyticsv2.client import KinesisAnalyticsV2Client
from mypy_boto3_kinesisanalyticsv2.type_defs import AddApplicationCloudWatchLoggingOptionResponseTypeDef
from mypy_boto3_kinesisanalyticsv2.type_defs import AddApplicationCloudWatchLoggingOptionRequestRequestTypeDef
session = Session()
client: KinesisAnalyticsV2Client = session.client("kinesisanalyticsv2")
kwargs: AddApplicationCloudWatchLoggingOptionRequestRequestTypeDef = {...}
result: AddApplicationCloudWatchLoggingOptionResponseTypeDef = client.add_application_cloud_watch_logging_option(**kwargs)
# ListApplicationOperationsPaginator usage example with type annotations
from boto3.session import Session
from mypy_boto3_kinesisanalyticsv2.client import KinesisAnalyticsV2Client
from mypy_boto3_kinesisanalyticsv2.paginator import ListApplicationOperationsPaginator
from mypy_boto3_kinesisanalyticsv2.type_defs import ListApplicationOperationsResponseTypeDef
session = Session()
client: KinesisAnalyticsV2Client = session.client("kinesisanalyticsv2")
paginator: ListApplicationOperationsPaginator = client.get_paginator("list_application_operations")
for item in paginator.paginate(...):
item: ListApplicationOperationsResponseTypeDef
print(item)