Skip to content

EMR module

Index > EMR

Auto-generated documentation for EMR type annotations stubs module mypy-boto3-emr.

How to install

VSCode extension

Add AWS Boto3 extension to your VSCode and run AWS boto3: Quick Start command.

Click Modify and select boto3 common and EMR.

From PyPI with pip

Install boto3-stubs for EMR service.

# install with boto3 type annotations
python -m pip install 'boto3-stubs[emr]'


# Lite version does not provide session.client/resource overloads
# it is more RAM-friendly, but requires explicit type annotations
python -m pip install 'boto3-stubs-lite[emr]'


# standalone installation
python -m pip install mypy-boto3-emr

How to uninstall

python -m pip uninstall -y mypy-boto3-emr

Usage

Code samples can be found in Examples.

EMRClient

Type annotations and code completion for boto3.client("emr") as EMRClient boto3 documentation

Usage example
from boto3.session import Session

from mypy_boto3_emr.client import EMRClient

def get_client() -> EMRClient:
    return Session().client("emr")

Paginators

Type annotations and code completion for paginators from boto3.client("emr").get_paginator("...").

Usage example
from boto3.session import Session

from mypy_boto3_emr.paginator import ListBootstrapActionsPaginator

def get_list_bootstrap_actions_paginator() -> ListBootstrapActionsPaginator:
    return Session().client("emr").get_paginator("list_bootstrap_actions"))

Waiters

Type annotations and code completion for waiters from boto3.client("emr").get_waiter("...").

Usage example
from boto3.session import Session

from mypy_boto3_emr.waiter import ClusterRunningWaiter

def get_cluster_running_waiter() -> ClusterRunningWaiter:
    return Session().client("emr").get_waiter("cluster_running")

Literals

Type annotations for literals used in methods and schemas.

Usage example
from mypy_boto3_emr.literals import ActionOnFailureType

def get_value() -> ActionOnFailureType:
    return "CANCEL_AND_WAIT"

Typed dictionaries

Type annotations for typed dictionaries used in methods and schema.

Usage example
from mypy_boto3_emr.type_defs import ResponseMetadataTypeDef

def get_value() -> ResponseMetadataTypeDef:
    return {
        "RequestId": ...,
        "HostId": ...,
        "HTTPStatusCode": ...,
        "HTTPHeaders": ...,
        "RetryAttempts": ...,
    }