{"id":3086,"library":"mypy-boto3-emr-serverless","title":"mypy-boto3-emr-serverless Type Stubs","description":"mypy-boto3-emr-serverless provides type annotations (stubs) for the boto3 EMRServerless client, enabling static type checking with tools like MyPy. It ensures type safety and autocompletion for EMR Serverless operations when using boto3. The package is generated by `mypy-boto3-builder` and is updated frequently, often in sync with boto3/botocore releases.","status":"active","version":"1.42.23","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["mypy","boto3","aws","type-annotations","stubs","emr-serverless","static-analysis"],"install":[{"cmd":"pip install mypy-boto3-emr-serverless boto3","lang":"bash","label":"Install for boto3"}],"dependencies":[{"reason":"This package provides type stubs for boto3; boto3 itself is required for runtime functionality.","package":"boto3"},{"reason":"Type checker that consumes these stubs for static analysis.","package":"mypy"}],"imports":[{"symbol":"EMRServerlessClient","correct":"from mypy_boto3_emr_serverless.client import EMRServerlessClient"},{"symbol":"ListApplicationsPaginator","correct":"from mypy_boto3_emr_serverless.paginator import ListApplicationsPaginator"},{"symbol":"ApplicationStateTypeDef","correct":"from mypy_boto3_emr_serverless.type_defs import ApplicationStateTypeDef"}],"quickstart":{"code":"import boto3\nfrom typing import TYPE_CHECKING\n\nif TYPE_CHECKING:\n    from mypy_boto3_emr_serverless.client import EMRServerlessClient\n    from mypy_boto3_emr_serverless.type_defs import ListApplicationsOutputTypeDef\n\n\ndef get_emr_serverless_applications() -> None:\n    client: EMRServerlessClient = boto3.client(\"emr-serverless\")\n    response: ListApplicationsOutputTypeDef = client.list_applications()\n\n    print(f\"Found {len(response['applications'])} EMR Serverless applications.\")\n    for app in response.get('applications', []):\n        print(f\"- {app['name']} (State: {app['state']})\")\n\nif __name__ == \"__main__\":\n    get_emr_serverless_applications()\n","lang":"python","description":"This example demonstrates how to use `mypy-boto3-emr-serverless` for type-hinting a boto3 EMR Serverless client. The type import is guarded by `TYPE_CHECKING` to ensure it's only active during static analysis and does not affect runtime, as `mypy-boto3` packages are purely for type stubs."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or higher.","message":"Starting with `mypy-boto3-builder` version 8.12.0 (which generated `mypy-boto3-emr-serverless` 1.42.23+), support for Python 3.8 has been removed. Projects using these stubs must target Python 3.9 or newer.","severity":"breaking","affected_versions":">=1.42.23"},{"fix":"Ensure your development environment (e.g., IDE, custom build scripts) is compatible with standard PEP 561 package layouts. No action is usually needed for default `mypy` usage.","message":"All `mypy-boto3` packages, including `mypy-boto3-emr-serverless`, migrated to PEP 561 distribution format with `mypy-boto3-builder` version 8.12.0. While typically seamless, this might affect how certain tooling or custom environments discover type stubs.","severity":"breaking","affected_versions":">=1.42.23"},{"fix":"Only import types from `mypy_boto3_emr_serverless` packages within `if TYPE_CHECKING:` blocks or for annotations that are only consumed by static analyzers. Always use `boto3.client('emr-serverless')` for runtime operations.","message":"`mypy-boto3-emr-serverless` provides only type stubs for static analysis. It should *not* be imported or used at runtime. The actual EMR Serverless client functionality comes from `boto3`.","severity":"gotcha","affected_versions":"all"},{"fix":"Consult the `mypy-boto3` documentation or your type checker's errors for updated TypeDef names if you encounter issues after upgrading. IDE auto-completion can also help discover correct types.","message":"From `mypy-boto3-builder` version 8.9.0, some TypeDef names were changed for consistency (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). While not specific to EMR Serverless, this pattern might lead to breaking changes in type references for other services or if future EMR Serverless TypeDefs follow a similar pattern.","severity":"gotcha","affected_versions":">=1.42.0"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}