Examples#
Auto-generated documentation for EMR type annotations stubs module mypy-boto3-emr.
Client#
Implicit type annotations#
Can be used with boto3-stubs[emr]
package installed.
Write your EMR
code as usual,
type checking and code completion should work out of the box.
# EMRClient usage example
from boto3.session import Session
session = Session()
client = session.client("emr") # (1)
result = client.add_instance_fleet() # (2)
- client: EMRClient
- result: AddInstanceFleetOutputTypeDef
# ListBootstrapActionsPaginator usage example
from boto3.session import Session
session = Session()
client = session.client("emr") # (1)
paginator = client.get_paginator("list_bootstrap_actions") # (2)
for item in paginator.paginate(...):
print(item) # (3)
- client: EMRClient
- paginator: ListBootstrapActionsPaginator
- item: ListBootstrapActionsOutputTypeDef
# ClusterRunningWaiter usage example
from boto3.session import Session
session = Session()
client = session.client("emr") # (1)
waiter = client.get_waiter("cluster_running") # (2)
waiter.wait()
- client: EMRClient
- waiter: ClusterRunningWaiter
Explicit type annotations#
With boto3-stubs-lite[emr]
or a standalone mypy_boto3_emr
package, you have to explicitly specify client: EMRClient
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.