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