Skip to content

Examples#

Index > MediaPackageVod > Examples

Auto-generated documentation for MediaPackageVod type annotations stubs module mypy-boto3-mediapackage-vod.

Client#

Implicit type annotations#

Can be used with boto3-stubs[mediapackage-vod] package installed.

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

# MediaPackageVodClient usage example

from boto3.session import Session


session = Session()

client = session.client("mediapackage-vod")  # (1)
result = client.configure_logs()  # (2)
  1. client: MediaPackageVodClient
  2. result: ConfigureLogsResponseTypeDef
# ListAssetsPaginator usage example

from boto3.session import Session


session = Session()
client = session.client("mediapackage-vod")  # (1)

paginator = client.get_paginator("list_assets")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
  1. client: MediaPackageVodClient
  2. paginator: ListAssetsPaginator
  3. item: ListAssetsResponseTypeDef

Explicit type annotations#

With boto3-stubs-lite[mediapackage-vod] or a standalone mypy_boto3_mediapackage_vod package, you have to explicitly specify client: MediaPackageVodClient 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.

# MediaPackageVodClient usage example with type annotations

from boto3.session import Session

from mypy_boto3_mediapackage_vod.client import MediaPackageVodClient
from mypy_boto3_mediapackage_vod.type_defs import ConfigureLogsResponseTypeDef
from mypy_boto3_mediapackage_vod.type_defs imp