Skip to content

Examples#

Index > KinesisVideo > Examples

Auto-generated documentation for KinesisVideo type annotations stubs module types-boto3-kinesisvideo.

Client#

Implicit type annotations#

Can be used with types-boto3[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)
  1. client: KinesisVideoClient
  2. 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)
  1. client: KinesisVideoClient
  2. paginator: DescribeMappedResourceConfigurationPaginator
  3. item: DescribeMappedResourceConfigurationOutputTypeDef

Explicit type annotations#

With types-boto3-lite[kinesisvideo] or a standalone types_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 types_boto3_kinesisvideo.client import KinesisVideoClient
from types_boto3_kinesisvideo.type_defs import CreateSignalingChannelOutputTypeDef
from types_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 types_boto3_kinesisvideo.client import KinesisVideoClient
from types_boto3_kinesisvideo.paginator import DescribeMappedResourceConfigurationPaginator
from types_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)