Skip to content

Examples#

Index > KinesisVideoMedia > Examples

Auto-generated documentation for KinesisVideoMedia type annotations stubs module mypy-boto3-kinesis-video-media.

Client#

Implicit type annotations#

Can be used with boto3-stubs[kinesis-video-media] package installed.

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

# KinesisVideoMediaClient usage example

from boto3.session import Session


session = Session()

client = session.client("kinesis-video-media")  # (1)
result = client.get_media()  # (2)
  1. client: KinesisVideoMediaClient
  2. result: GetMediaOutputTypeDef

Explicit type annotations#

With boto3-stubs-lite[kinesis-video-media] or a standalone mypy_boto3_kinesis_video_media package, you have to explicitly specify client: KinesisVideoMediaClient 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.

# KinesisVideoMediaClient usage example with type annotations

from boto3.session import Session

from mypy_boto3_kinesis_video_media.client import KinesisVideoMediaClient
from mypy_boto3_kinesis_video_media.type_defs import GetMediaOutputTypeDef
from mypy_boto3_kinesis_video_media.type_defs import GetMediaInputRequestTypeDef


session = Session()

client: KinesisVideoMediaClient = session.client("kinesis-video-media")

kwargs: GetMediaInputRequestTypeDef = {...}
result: GetMediaOutputTypeDef = client.get_media(**kwargs)