mypy-boto3-mediapackage-vod

1.42.3 · active · verified Sat Apr 11

mypy-boto3-mediapackage-vod provides static type annotations for the `boto3` MediaPackageVod service client, enhancing development with improved IDE auto-completion, static analysis, and early error detection. It is version 1.42.3 and is actively maintained, with releases tied to updates in `boto3` and its generator, `mypy-boto3-builder`.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to initialize a `boto3` MediaPackageVod client with type hints provided by `mypy-boto3-mediapackage-vod`. The `TYPE_CHECKING` block ensures that type imports are only active during static analysis, preventing runtime dependencies. The example then calls `list_assets` and uses the typed response.

import boto3
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from mypy_boto3_mediapackage_vod.client import MediaPackageVodClient
    from mypy_boto3_mediapackage_vod.type_defs import ListAssetsResponseTypeDef

def list_vod_assets() -> ListAssetsResponseTypeDef:
    # mypy-boto3-mediapackage-vod provides type hints for the client
    client: MediaPackageVodClient = boto3.client("mediapackage-vod")
    response = client.list_assets()
    return response

if __name__ == "__main__":
    # Example usage (requires AWS credentials configured)
    try:
        assets = list_vod_assets()
        print(f"Found {len(assets.get('Assets', []))} MediaPackage VOD assets.")
    except Exception as e:
        print(f"Error listing assets: {e}")

view raw JSON →