Examples#
Index > MediaConvert > Examples
Auto-generated documentation for MediaConvert type annotations stubs module mypy-boto3-mediaconvert.
Client#
Implicit type annotations#
Can be used with boto3-stubs[mediaconvert]
package installed.
Write your MediaConvert
code as usual,
type checking and code completion should work out of the box.
# MediaConvertClient usage example
from boto3.session import Session
session = Session()
client = session.client("mediaconvert") # (1)
result = client.create_job() # (2)
- client: MediaConvertClient
- result: CreateJobResponseTypeDef
# DescribeEndpointsPaginator usage example
from boto3.session import Session
session = Session()
client = session.client("mediaconvert") # (1)
paginator = client.get_paginator("describe_endpoints") # (2)
for item in paginator.paginate(...):
print(item) # (3)
- client: MediaConvertClient
- paginator: DescribeEndpointsPaginator
- item: DescribeEndpointsResponseTypeDef
Explicit type annotations#
With boto3-stubs-lite[mediaconvert]
or a standalone mypy_boto3_mediaconvert
package, you have to explicitly specify client: MediaConvertClient
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.
# MediaConvertClient usage example with type annotations
from boto3.session import Session
from mypy_boto3_mediaconvert.client import MediaConvertClient
from mypy_boto3_mediaconvert.type_defs import CreateJobResponseTypeDef
from mypy_boto3_mediaconvert.type_defs import CreateJobRequestRequestTypeDef
session = Session()
client: MediaConvertClient = session.client("mediaconvert")
kwargs: CreateJobRequestRequestTypeDef = {...}
result: CreateJobResponseTypeDef = client.create_job(**kwargs)
# DescribeEndpointsPaginator usage example with type annotations
from boto3.session import Session
from mypy_boto3_mediaconvert.client import MediaConvertClient
from mypy_boto3_mediaconvert.paginator import DescribeEndpointsPaginator
from mypy_boto3_mediaconvert.type_defs import DescribeEndpointsResponseTypeDef
session = Session()
client: MediaConvertClient = session.client("mediaconvert")
paginator: DescribeEndpointsPaginator = client.get_paginator("describe_endpoints")
for item in paginator.paginate(...):
item: DescribeEndpointsResponseTypeDef
print(item)