Skip to content

Examples#

Index > KinesisVideoArchivedMedia > Examples

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

Client#

Implicit type annotations#

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

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

# KinesisVideoArchivedMediaClient usage example

from boto3.session import Session


session = Session()

client = session.client("kinesis-video-archived-media")  # (1)
result = client.get_clip()  # (2)
  1. client: KinesisVideoArchivedMediaClient
  2. result: GetClipOutputTypeDef
# GetImagesPaginator usage example

from boto3.session import Session


session = Session()
client = session.client("kinesis-video-archived-media")  # (1)

paginator = client.get_paginator("get_images")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
  1. client: KinesisVideoArchivedMediaClient
  2. paginator: GetImagesPaginator
  3. item: GetImagesOutputTypeDef

Explicit type annotations#

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

# KinesisVideoArchivedMediaClient usage example with type annotations

from boto3.session import Session

from mypy_boto3_kinesis_video_archived_media.client import KinesisVideoArchivedMediaClient
from mypy_boto3_kinesis_video_archived_media.type_defs import GetClipOutputTypeDef
from mypy_boto3_kinesis_video_archived_media.type_defs import GetClipInputRequestTypeDef


session = Session()

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

kwargs: GetClipInputRequestTypeDef = {...}
result: GetClipOutputTypeDef = client.get_clip(**kwargs)
# GetImagesPaginator usage example with type annotations

from boto3.session import Session

from mypy_boto3_kinesis_video_archived_media.client import KinesisVideoArchivedMediaClient
from mypy_boto3_kinesis_video_archived_media.paginator import GetImagesPaginator
from mypy_boto3_kinesis_video_archived_media.type_defs import GetImagesOutputTypeDef


session = Session()
client: KinesisVideoArchivedMediaClient = session.client("kinesis-video-archived-media")

paginator: GetImagesPaginator = client.get_paginator("get_images")
for item in paginator.paginate(...):
    item: GetImagesOutputTypeDef
    print(item)