mypy-boto3-medialive Type Annotations

1.42.86 · active · verified Sat Apr 11

This library provides type annotations (stubs) for the `boto3` MediaLive client, allowing static type checkers like MyPy to validate usage of `boto3`. It is currently at version 1.42.86 and receives frequent updates, often aligning with `boto3`/`botocore` releases and `mypy-boto3-builder` updates, which is the underlying generation tool.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to create a `boto3` MediaLive client and apply the `mypy-boto3-medialive` type annotation for improved static analysis. It assumes `boto3` is already installed and configured.

import boto3
from mypy_boto3_medialive import MediaLiveClient

def get_medialive_client() -> MediaLiveClient:
    """Returns a typed MediaLive client."""
    # Boto3 client creation remains the same, but now with type hints
    client: MediaLiveClient = boto3.client("medialive")
    return client

# Example usage with type checking
medialive_client = get_medialive_client()
response = medialive_client.list_channels()
print(f"MediaLive channels: {len(response.get('Channels', []))}")

view raw JSON →