Type Annotations for boto3 Kinesis Video Archived Media

1.42.3 · active · verified Sat Apr 11

This library provides precise type hints for `boto3`'s `KinesisVideoArchivedMedia` client, enabling static analysis tools like MyPy. It's an integral part of the `mypy-boto3` ecosystem, which generates stubs for all AWS services. The package is frequently updated, typically aligning with `boto3` and `botocore` releases, with the current version being `1.42.3`.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to instantiate a `boto3` client and leverage `mypy-boto3-kinesis-video-archived-media` to provide static type hints for it. The type annotations are applied at type-checking time, while the runtime behavior remains identical to standard `boto3`.

import boto3
from mypy_boto3_kinesis_video_archived_media import KinesisVideoArchivedMediaClient

# Instantiate the boto3 client normally.
# Mypy-boto3 provides the static type annotations at type-checking time.
client: KinesisVideoArchivedMediaClient = boto3.client(
    "kinesis-video-archived-media",
    region_name="us-east-1" # Ensure AWS credentials are configured (e.g., via env vars or ~/.aws/credentials)
)

# Now 'client' is statically typed as KinesisVideoArchivedMediaClient.
# MyPy will validate method calls and arguments, providing autocompletion and error checking.
# Example (uncomment to run, requires valid AWS credentials and Kinesis Video Stream):
# from mypy_boto3_kinesis_video_archived_media.type_defs import GetHLSStreamingSessionURLRequestRequestTypeDef
# request: GetHLSStreamingSessionURLRequestRequestTypeDef = {
#     "StreamName": "your-stream-name",
#     "PlaybackMode": "LIVE"
# }
# response = client.get_hls_streaming_session_url(**request)
# print(f"HLS Session URL: {response['HLSStreamingSessionURL']}")

print(f"Successfully created a typed Kinesis Video Archived Media client: {type(client)}")
print("MyPy will now provide type-checking for 'client' methods and arguments.")

view raw JSON →