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