{"id":5665,"library":"mypy-boto3-medialive","title":"mypy-boto3-medialive Type Annotations","description":"This library provides type annotations (stubs) for the `boto3` MediaLive client, allowing static type checkers like MyPy to validate usage of `boto3`. It is currently at version 1.42.86 and receives frequent updates, often aligning with `boto3`/`botocore` releases and `mypy-boto3-builder` updates, which is the underlying generation tool.","status":"active","version":"1.42.86","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["aws","boto3","mypy","type-hints","medialive","stubs"],"install":[{"cmd":"pip install mypy-boto3-medialive","lang":"bash","label":"Install library"}],"dependencies":[{"reason":"Provides the runtime functionality for which these are type stubs.","package":"boto3","optional":false}],"imports":[{"note":"The stubs are in their own package, not directly within the boto3 namespace.","wrong":"from boto3.client import medialive","symbol":"MediaLiveClient","correct":"from mypy_boto3_medialive import MediaLiveClient"},{"note":"Type definitions for service requests/responses are typically found in the `type_defs` submodule.","symbol":"BatchUpdateScheduleRequestRequestTypeDef","correct":"from mypy_boto3_medialive.type_defs import BatchUpdateScheduleRequestRequestTypeDef"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_medialive import MediaLiveClient\n\ndef get_medialive_client() -> MediaLiveClient:\n    \"\"\"Returns a typed MediaLive client.\"\"\"\n    # Boto3 client creation remains the same, but now with type hints\n    client: MediaLiveClient = boto3.client(\"medialive\")\n    return client\n\n# Example usage with type checking\nmedialive_client = get_medialive_client()\nresponse = medialive_client.list_channels()\nprint(f\"MediaLive channels: {len(response.get('Channels', []))}\")","lang":"python","description":"This quickstart demonstrates how to create a `boto3` MediaLive client and apply the `mypy-boto3-medialive` type annotation for improved static analysis. It assumes `boto3` is already installed and configured."},"warnings":[{"fix":"Uninstall `mypy-boto3-medialive` and install `boto3-stubs-medialive` instead: `pip uninstall mypy-boto3-medialive && pip install boto3-stubs-medialive`.","message":"The `mypy-boto3-*` package naming scheme is considered legacy and deprecated by the maintainers. It is highly recommended to migrate to the `boto3-stubs-*` equivalent packages (e.g., `boto3-stubs-medialive`) for future updates and better feature support.","severity":"deprecated","affected_versions":"All versions 8.9.0 and later of `mypy-boto3-builder` consider `mypy-boto3-*` deprecated."},{"fix":"Upgrade your Python environment to 3.9 or higher. If you must use Python 3.8, you will need to pin to an older version of `mypy-boto3-medialive` (e.g., <1.42.86).","message":"Support for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0. Packages generated with this builder, including `mypy-boto3-medialive` 1.42.86 and newer, will no longer support Python 3.8.","severity":"breaking","affected_versions":"mypy-boto3-medialive >= 1.42.86 (generated by builder 8.12.0+)"},{"fix":"Ensure `boto3` is installed in your environment: `pip install boto3`.","message":"This library provides type *stubs* only; it does not replace or include the actual `boto3` runtime library. You must install `boto3` separately for your code to function at runtime.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Review your code for any custom TypeDef imports or direct references that might have been affected by the naming change and update them accordingly. Refer to the specific service's type_defs module.","message":"Type definition naming conventions changed in `mypy-boto3-builder` version 8.9.0. This caused potential breaking changes in TypeDef names for all generated services. For instance, `CreateDistributionRequestRequestTypeDef` might have been shortened to `CreateDistributionRequestTypeDef`, or `Extra` postfixes moved.","severity":"breaking","affected_versions":"mypy-boto3-medialive >= 1.40.0 (generated by builder 8.9.0+)"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}