mypy-boto3-mediapackage-vod
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
- breaking Support for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0, affecting all generated `mypy-boto3` stub packages, including `mypy-boto3-mediapackage-vod`. Projects using Python 3.8 will no longer receive type hints or updates from this version onwards.
- breaking The `mypy-boto3-builder` (which generates this package) migrated to PEP 561 compliant packages in version 8.12.0. This change might affect how some build systems or older static analysis tools interpret the stub distribution.
- gotcha This package provides only type annotations; it does NOT install or include `boto3` itself. For your application to run, `boto3` must be installed separately in your environment.
- breaking Breaking changes were introduced in `mypy-boto3-builder` 8.9.0 regarding `TypedDict` naming conventions. Specifically, method argument `TypeDef`s now use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`), and conflicting `TypeDef` `Extra` postfixes were moved to the end (e.g., `CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`).
- gotcha While many IDEs and `mypy` can infer types, explicitly annotating `boto3.client` and `boto3.resource` calls with the imported client/resource types from `mypy_boto3_servicename` can improve accuracy, especially in IDEs like VSCode or when using 'lite' stub versions.
Install
-
pip install mypy-boto3-mediapackage-vod
Imports
- MediaPackageVodClient
from mypy_boto3_mediapackage_vod.client import MediaPackageVodClient
- MediaPackageVodServiceName
from mypy_boto3_mediapackage_vod.literals import MediaPackageVodServiceName
Quickstart
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}")