{"id":3643,"library":"mypy-boto3-mwaa-serverless","title":"mypy-boto3-mwaa-serverless","description":"This package provides type annotations for the `boto3` MWAA Serverless service, generated by `mypy-boto3-builder`. It enhances type checking for `boto3` users, allowing tools like MyPy to validate usage of the `mwaa-serverless` client. The library follows a frequent release cadence, typically updated with new `boto3` versions and `mypy-boto3-builder` enhancements.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["boto3","aws","mypy","type-stubs","mwaa-serverless","mwaa","airflow"],"install":[{"cmd":"pip install mypy-boto3-mwaa-serverless boto3 mypy","lang":"bash","label":"Install library with dependencies"}],"dependencies":[{"reason":"Provides the actual AWS SDK implementation at runtime. `mypy-boto3-mwaa-serverless` only provides type stubs.","package":"boto3","optional":false},{"reason":"A static type checker required to leverage the type annotations provided by this library.","package":"mypy","optional":true}],"imports":[{"note":"Client types are nested under the `.client` submodule in recent versions.","wrong":"from mypy_boto3_mwaa_serverless import MWAAServerlessClient","symbol":"MWAAServerlessClient","correct":"from mypy_boto3_mwaa_serverless.client import MWAAServerlessClient"},{"note":"TypeDef names were shortened in `mypy-boto3-builder` version 8.9.0.","wrong":"from mypy_boto3_mwaa_serverless.type_defs import CreateEnvironmentRequestRequestTypeDef","symbol":"CreateEnvironmentRequestTypeDef","correct":"from mypy_boto3_mwaa_serverless.type_defs import CreateEnvironmentRequestTypeDef"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_mwaa_serverless.client import MWAAServerlessClient\nfrom typing import TYPE_CHECKING\n\n# This block is for type-checking only, for documentation of what types are available\nif TYPE_CHECKING:\n    # Example of importing a specific TypeDef for request/response structures\n    from mypy_boto3_mwaa_serverless.type_defs import ListEnvironmentsResponseTypeDef\n\ndef get_mwaa_client() -> MWAAServerlessClient:\n    \"\"\"\n    Returns a type-hinted MWAA Serverless client using boto3.\n    \"\"\"\n    # 'mwaa-serverless' is the correct service name for boto3 client creation\n    return boto3.client(\"mwaa-serverless\")\n\ndef list_mwaa_environments(client: MWAAServerlessClient) -> None:\n    \"\"\"\n    Lists MWAA Serverless environments with type annotations.\n    \"\"\"\n    # The client method call itself is from boto3, type-checked by mypy-boto3-mwaa-serverless\n    response: ListEnvironmentsResponseTypeDef = client.list_environments()\n    print(\"MWAA Environments:\")\n    for env in response.get('Environments', []):\n        print(f\"  - Name: {env.get('Name')}, Status: {env.get('Status')}\")\n\nif __name__ == \"__main__\":\n    # Ensure AWS credentials are configured (e.g., via environment variables, ~/.aws/credentials)\n    mwaa_client = get_mwaa_client()\n    list_mwaa_environments(mwaa_client)\n","lang":"python","description":"This quickstart demonstrates how to initialize a `boto3` client for MWAA Serverless and use it with type annotations provided by `mypy-boto3-mwaa-serverless`. It shows importing the `MWAAServerlessClient` type and using it to hint a `boto3` client, then making a sample `list_environments` call. Remember that `boto3` itself must be installed and configured for actual runtime execution."},"warnings":[{"fix":"Upgrade your Python environment to version 3.9 or newer.","message":"Support for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0. All `mypy-boto3-*` packages, including `mypy-boto3-mwaa-serverless`, now require Python >= 3.9.","severity":"breaking","affected_versions":">=8.12.0 of mypy-boto3-builder (and corresponding stub packages)"},{"fix":"Update your TypeDef imports and variable annotations to use the new, shorter names. Refer to the specific service's `type_defs.pyi` for exact names.","message":"TypeDef names for packed method arguments were shortened in `mypy-boto3-builder` version 8.9.0. For example, `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`. Additionally, the `Extra` postfix for conflicting TypeDefs moved to the end (e.g., `CreateDistributionExtraRequestTypeDef` became `CreateDistributionRequestExtraTypeDef`).","severity":"breaking","affected_versions":">=8.9.0 of mypy-boto3-builder (and corresponding stub packages)"},{"fix":"Ensure your `mypy` configuration is up-to-date. For most users, this change is transparent, but it's important for package managers or custom type checking setups.","message":"`mypy-boto3-builder` migrated to PEP 561 compliant packages in version 8.12.0. This change affects how type checkers discover and interact with the type stubs, potentially requiring minor adjustments in build systems or type checker configurations, especially for advanced use cases.","severity":"breaking","affected_versions":">=8.12.0 of mypy-boto3-builder (and corresponding stub packages)"},{"fix":"Always install `boto3` alongside `mypy-boto3-mwaa-serverless` (e.g., `pip install boto3 mypy-boto3-mwaa-serverless`).","message":"This package provides *only* type stubs. For actual runtime execution, you must also install the `boto3` library. The stubs work by providing type hints for `boto3`'s dynamically typed clients.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}