Registry / type-stubs / mypy-boto3-emr

mypy-boto3-emr

JSON →
library1.43.50pypypi✓ verified 23d ago

mypy-boto3-emr provides high-quality type annotations for the AWS boto3 EMR (Elastic MapReduce) service. It allows developers to leverage static type checking with tools like MyPy, improving code reliability and developer experience when working with boto3. The library is currently at version 1.42.77 and is part of the `youtype/mypy_boto3_builder` project, which generates new stub packages frequently, typically aligning with boto3/botocore releases.

pip install mypy-boto3-emr
INSTALL
IMPORT
SIG · MYPY-BOTO3-EMR
M
mypy-boto3-emr
type-stubspythonv1.43.50
Install
3.8s avg
Import
Disk
232MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.50 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 198.8MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 3.8s · import 0.000s · 267MB
232MB installed
● package 232MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

EMRClient
from mypy_boto3_emr.client import EMRClient
from mypy_boto3_emr.client import EMRClient
EMRServiceResource
from mypy_boto3_emr import EMRServiceResource
from mypy_boto3_emr.client import EMRClient
Client
from mypy_boto3_emr import Client
from mypy_boto3_emr.client import EMRClient

This quickstart demonstrates how to use `mypy-boto3-emr` to add type hints to your boto3 EMR client and API responses. The `TYPE_CHECKING` block ensures that stub imports are only processed by the type checker, avoiding runtime import errors if the stubs are not installed. Explicitly typing the client and response objects allows MyPy to provide comprehensive checks.

import boto3 from typing import TYPE_CHECKING, List, Dict, Any import os # Conditional import for type checking only if TYPE_CHECKING: from mypy_boto3_emr.client import EMRClient from mypy_boto3_emr.type_defs import ListClustersOutputTypeDef, ClusterSummaryTypeDef # Example function using type hints def get_running_emr_clusters() -> List[ClusterSummaryTypeDef]: # The client variable is explicitly typed for MyPy client: EMRClient = boto3.client( "emr", region_name=os.environ.get('AWS_REGION', 'us-east-1'), aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID', 'DUMMY_KEY'), aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY', 'DUMMY_SECRET') ) # The response variable is explicitly typed response: ListClustersOutputTypeDef = client.list_clusters(ClusterStates=['RUNNING']) clusters: List[ClusterSummaryTypeDef] = response.get('Clusters', []) print(f"Found {len(clusters)} running EMR clusters.") for cluster in clusters: print(f" - Cluster ID: {cluster['Id']}, Name: {cluster['Name']}") return clusters if __name__ == "__main__": # This code will run, but type hints are only checked by MyPy get_running_emr_clusters()
Debug
Known issues
breakingSupport for Python 3.8 has been removed in `mypy-boto3-builder` version 8.12.0. Users on Python 3.8 will need to upgrade to Python 3.9 or newer to use the latest stub packages.
fix
Upgrade your Python environment to 3.9 or newer. If you must use Python 3.8, you will be limited to older versions of `mypy-boto3-emr`.
affects: >=8.12.0 of mypy-boto3-builder (and generated stubs)
breakingTypeDef naming conventions changed significantly in `mypy-boto3-builder` version 8.9.0. Specifically, redundant 'Request' suffixes were removed (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`), and 'Extra' postfixes moved to the end of the name. This may break explicit imports of TypeDefs.
fix
Review your code for explicit imports of `_type_defs` and adjust the `TypeDef` names according to the new conventions.
affects: >=8.9.0 of mypy-boto3-builder (and generated stubs)
gotcha`mypy-boto3-emr` provides *only* type stubs for the EMR service. It does not include the runtime `boto3` library itself. For your code to run, `boto3` must be installed separately.
fix
Ensure `boto3` is installed alongside `mypy-boto3-emr` (e.g., `pip install boto3 mypy-boto3-emr`).
affects: All versions
gotchaAWS service names can change or be deprecated over time (e.g., `sms-voice` was replaced by `pinpoint-sms-voice` in builder 8.11.0). This means the corresponding `mypy-boto3` stub package names might also change or be removed. Always consult the latest `boto3` and `mypy-boto3` documentation for current service names.
fix
Stay updated with `boto3` and `mypy-boto3` releases. If a service name changes, update your `boto3.client()` calls and install the correct `mypy-boto3-servicename` package.
affects: All versions (ecosystem-wide)
Upgrade
Version history
1.43.50latest on PyPI · released Jul 16, 2026
Audit
Dependencies
boto3requiredThis package provides type stubs for boto3; boto3 itself is required for runtime functionality.
mypyrequiredRequired for static type checking. The stubs are only useful if MyPy or a similar type checker is used.
Agent activity
20 hits · last 30 days
node
18
OpenAI (training)
1
Resources
mypy-boto3-emr — pip install mypy-boto3-emr · libregistry