{"id":3563,"library":"mypy-boto3-chime-sdk-media-pipelines","title":"mypy-boto3-chime-sdk-media-pipelines","description":"This library provides comprehensive type annotations for the `boto3` AWS SDK, specifically for the Chime SDK Media Pipelines service (version 1.42.3). It enhances developer experience by enabling static type checking with tools like MyPy, PyRight, and improved auto-completion in IDEs such as VSCode and PyCharm. The package is actively maintained, with releases frequently synchronized with `boto3` versions, generated by the `mypy-boto3-builder`.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["type hints","boto3","aws","mypy","stubs","chime-sdk-media-pipelines","type checking"],"install":[{"cmd":"pip install mypy-boto3-chime-sdk-media-pipelines boto3","lang":"bash","label":"Install service stubs and boto3"},{"cmd":"pip install 'boto3-stubs[chime-sdk-media-pipelines]' boto3","lang":"bash","label":"Install via boto3-stubs meta package"}],"dependencies":[{"reason":"Runtime dependency for actual AWS API calls. These stubs only provide type hints.","package":"boto3","optional":false},{"reason":"Requires Python 3.9 or higher as of mypy-boto3-builder 8.12.0.","package":"python","optional":false}],"imports":[{"note":"Client types are imported from the service-specific `mypy-boto3-*` stub package, not directly from `boto3`.","wrong":"from boto3.client import ChimeSDKMediaPipelinesClient","symbol":"ChimeSDKMediaPipelinesClient","correct":"from mypy_boto3_chime_sdk_media_pipelines.client import ChimeSDKMediaPipelinesClient"},{"note":"Use specific `TypedDict` definitions for precise type checking of request and response payloads instead of generic `dict` types.","wrong":"from typing import Dict, Any","symbol":"CreateMediaPipelineRequestTypeDef","correct":"from mypy_boto3_chime_sdk_media_pipelines.type_defs import CreateMediaPipelineRequestTypeDef"}],"quickstart":{"code":"from typing import TYPE_CHECKING\nimport boto3\n\nif TYPE_CHECKING:\n    from mypy_boto3_chime_sdk_media_pipelines.client import ChimeSDKMediaPipelinesClient\n    from mypy_boto3_chime_sdk_media_pipelines.type_defs import CreateMediaPipelineRequestTypeDef\n\ndef create_media_pipeline(name: str) -> dict:\n    # In a real application, you would pass credentials or rely on environment variables/config\n    # For demonstration, a client is created without explicit credentials.\n    client: \"ChimeSDKMediaPipelinesClient\" = boto3.client(\"chime-sdk-media-pipelines\")\n\n    # Example of using a TypedDict for request parameters\n    request_params: \"CreateMediaPipelineRequestTypeDef\" = {\n        \"DisplayName\": name,\n        \"Tags\": [{\"Key\": \"Environment\", \"Value\": \"Dev\"}]\n        # Add other required parameters as per AWS documentation\n    }\n\n    # This call is for demonstration; actual Chime SDK Media Pipelines creation might require more specific parameters.\n    # print(f\"Attempting to create media pipeline: {name}\")\n    # response = client.create_media_pipeline(DisplayName=name, **request_params)\n    # print(f\"Media pipeline created: {response['MediaPipeline']['MediaPipelineId']}\")\n\n    # Simulate a successful response for a runnable quickstart\n    return {\n        'MediaPipeline': {\n            'MediaPipelineId': 'dummy-pipeline-id-123',\n            'MediaPipelineArn': f'arn:aws:chime::123456789012:media-pipeline/{name}/dummy-pipeline-id-123',\n            'DisplayName': name,\n            'Status': 'InProgress'\n        }\n    }\n\nif __name__ == \"__main__\":\n    pipeline_name = \"MyTestMediaPipeline\"\n    result = create_media_pipeline(pipeline_name)\n    print(result)\n","lang":"python","description":"This quickstart demonstrates how to import and use the `ChimeSDKMediaPipelinesClient` type from `mypy-boto3-chime-sdk-media-pipelines` to get type hints for `boto3.client('chime-sdk-media-pipelines')`. It also shows how to use a `TypedDict` for request parameters, ensuring type correctness for API calls. The `if TYPE_CHECKING:` guard ensures that `mypy-boto3` is only a development dependency."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or later. If unable to upgrade, pin `mypy-boto3-*` packages to versions generated by `mypy-boto3-builder < 8.12.0`.","message":"As of `mypy-boto3-builder` version 8.12.0, support for Python 3.8 has been removed across all generated `mypy-boto3` packages. Ensure your project uses Python 3.9 or newer.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0, mypy-boto3-* >= 1.42.0"},{"fix":"No direct code changes are typically required. Ensure you are using a recent version of `pip` or `uv` for correct installation. If using custom build processes, verify PEP 561 compliance.","message":"Starting with `mypy-boto3-builder` version 8.12.0, packages migrated to PEP 561 standard packaging for type stubs. This primarily affects package metadata and structure but generally should be handled transparently by pip.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0, mypy-boto3-* >= 1.42.0"},{"fix":"Review and update your `TypedDict` import paths and names to match the new conventions. Consult the specific service's documentation or generated stub files for the correct names.","message":"In `mypy-boto3-builder` version 8.9.0, `TypedDict` naming conventions were changed. Specifically, redundant `Request` suffixes were removed (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`), and `Extra` postfixes were moved to the end of the name. This can break existing type annotations in your code.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.9.0, mypy-boto3-* >= 1.41.0 (approx.)"},{"fix":"Always include `boto3` in your project's runtime dependencies (e.g., `pip install boto3` or in `requirements.txt`).","message":"The `mypy-boto3-*` packages provide *only* type annotations. You must also have `boto3` installed at runtime for your application to function, as these stubs do not include the actual AWS SDK implementation.","severity":"gotcha","affected_versions":"All"},{"fix":"Encapsulate all `from mypy_boto3_... import ...` statements within an `if TYPE_CHECKING:` block, as shown in the quickstart example.","message":"It is best practice to wrap `mypy-boto3` type imports within `if TYPE_CHECKING:` blocks. This prevents `mypy-boto3` from becoming a runtime dependency, keeping your production environment lighter and avoiding potential issues with static analysis tools like Pylint.","severity":"gotcha","affected_versions":"All"},{"fix":"Instead of `my_dict = {'Key': 'Value'}`, declare `my_typed_dict: MyTypedDict = {'Key': 'Value'}` or use `typing.cast(MyTypedDict, {'Key': 'Value'})`.","message":"`mypy` treats `TypedDict` strictly. If a function expects a `TypedDict` and you pass a plain `dict`, even if its keys and values match, `mypy` will raise a type error. Explicitly instantiate `TypedDict` objects or use `typing.cast`.","severity":"gotcha","affected_versions":"All"},{"fix":"Prefer `pip install 'boto3-stubs[service_name]'` or `pip install types-boto3` for general usage, alongside specific `mypy-boto3-*` packages for direct type imports. No change needed for specific service stub packages like this one.","message":"The standalone `mypy-boto3` root package is now considered 'legacy'. For a comprehensive set of stubs for multiple services, `boto3-stubs` or `types-boto3` are the recommended meta-packages for installation. Individual service packages like `mypy-boto3-chime-sdk-media-pipelines` remain the correct way to import specific client/resource types.","severity":"deprecated","affected_versions":"mypy-boto3 <= 1.42.3"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}