Registry /
type-stubs / mypy-boto3-emr-containers
Install & Compatibility
Where this runs
tested against v1.43.57 · 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
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.638s · 52MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 2.7s · import 0.568s · 52MB
50MB installed
● package 50MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
EMRContainersClient
✓ from mypy_boto3_emr_containers import EMRContainersClient
✗ from boto3.client import EMRContainersClient
The client type is provided by the stub package, not directly from boto3.
ListVirtualClustersOutputTypeDef
✓ from mypy_boto3_emr_containers.type_defs import ListVirtualClustersOutputTypeDef
✗ from mypy_boto3_emr_containers.client import ListVirtualClustersOutputTypeDef
Type definitions (TypedDicts) are located in the `type_defs` submodule.
This quickstart demonstrates how to instantiate a type-hinted EMR Containers client and use it to list virtual clusters. The `EMRContainersClient` type ensures that method calls and return values are correctly type-checked by tools like mypy, catching potential issues at development time rather than runtime. Remember to have `boto3` installed alongside the stubs.
import boto3
from mypy_boto3_emr_containers import EMRContainersClient
from mypy_boto3_emr_containers.type_defs import ListVirtualClustersOutputTypeDef
def get_emr_containers_client() -> EMRContainersClient:
"""Returns a type-hinted EMR Containers client."""
# Ensure boto3 is installed: pip install boto3 mypy-boto3-emr-containers
client: EMRContainersClient = boto3.client("emr-containers")
return client
def list_virtual_clusters() -> None:
"""Lists EMR Containers virtual clusters with type checking."""
client = get_emr_containers_client()
try:
response: ListVirtualClustersOutputTypeDef = client.list_virtual_clusters()
print("Successfully listed virtual clusters:")
for cluster in response.get("virtualClusters", []):
name = cluster.get("name", "N/A")
cluster_id = cluster.get("id", "N/A")
status = cluster.get("status", {}).get("state", "UNKNOWN")
print(f" - Name: {name}, ID: {cluster_id}, Status: {status}")
if not response.get("virtualClusters"):
print(" No virtual clusters found.")
except Exception as e:
print(f"Error listing virtual clusters: {e}")
if __name__ == "__main__":
list_virtual_clusters()
Debug
Known issues
breakingPython 3.8 support was removed for all mypy-boto3 packages, including mypy-boto3-emr-containers, starting with mypy-boto3-builder v8.12.0.fixUpgrade your Python environment to 3.9 or higher. If you must use Python 3.8, pin your mypy-boto3-emr-containers version to an earlier release (e.g., <1.42.0).
affects: mypy-boto3-builder >= 8.12.0 (generating mypy-boto3-emr-containers >= 1.42.x)
gotchaThis package provides *type stubs* for boto3, not boto3 itself. You must install `boto3` separately for your code to run.fixAlways install `boto3` alongside `mypy-boto3-emr-containers` (e.g., `pip install boto3 mypy-boto3-emr-containers`).
affects: All versions
breakingTypeDef naming conventions changed significantly with mypy-boto3-builder v8.9.0. Some TypeDefs for packed method arguments or conflicting names received shorter or reordered postfixes (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`).fixUpdate your type annotation imports and usage to reflect the new TypeDef names. Consult the generated stub files or the `mypy-boto3-builder` release notes for specific changes.
affects: mypy-boto3-builder >= 8.9.0 (generating mypy-boto3-emr-containers versions from this builder version onwards)
Upgrade
Version history
1.43.57latest on PyPI · released Jul 27, 2026
Audit
Dependencies
boto3requiredProvides the actual AWS SDK runtime; these stubs provide type hints for it.
types-botocore-emr-containersrequiredCore botocore stubs for EMR Containers, automatically installed as a dependency.
mypyoptionalRequired for static type checking; not a runtime dependency.