{"id":3353,"library":"mypy-boto3-datapipeline","title":"mypy-boto3-datapipeline Type Stubs","description":"mypy-boto3-datapipeline provides static type annotations for the `boto3` DataPipeline service, generated by `mypy-boto3-builder`. It enhances development with type-checking capabilities for `boto3` clients, resources, and waiters, without altering runtime behavior. The current version is 1.42.3, and releases are frequent, typically mirroring new `boto3` versions.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["aws","boto3","mypy","type-stubs","datapipeline","type-hinting","static-analysis"],"install":[{"cmd":"pip install boto3 mypy-boto3-datapipeline","lang":"bash","label":"Install boto3 and its DataPipeline stubs"}],"dependencies":[{"reason":"mypy-boto3-datapipeline provides type stubs for boto3; boto3 is required for runtime functionality.","package":"boto3","optional":false}],"imports":[{"note":"For explicit type hinting of the boto3 DataPipeline client object.","symbol":"DataPipelineClient","correct":"from mypy_boto3_datapipeline.client import DataPipelineClient"},{"note":"The most common usage pattern. Mypy picks up the stubs automatically when `boto3` is used.","symbol":"Client via boto3.client","correct":"import boto3\nfrom typing import TYPE_CHECKING\n\nif TYPE_CHECKING:\n    from mypy_boto3_datapipeline.client import DataPipelineClient\n\ndef get_datapipeline_client() -> DataPipelineClient:\n    return boto3.client('datapipeline')"},{"note":"For explicit type hinting of service-specific request dictionaries.","symbol":"CreatePipelineInputRequestTypeDef","correct":"from mypy_boto3_datapipeline.type_defs import CreatePipelineInputRequestTypeDef"}],"quickstart":{"code":"import boto3\nfrom typing import TYPE_CHECKING\n\n# Ensure both boto3 and mypy-boto3-datapipeline are installed:\n# pip install boto3 mypy-boto3-datapipeline\n\nif TYPE_CHECKING:\n    # Import the client type for explicit type hints within type-checking blocks\n    from mypy_boto3_datapipeline.client import DataPipelineClient\n\n# Obtain a DataPipeline client. Mypy will use the installed stubs for type checking.\ndatapipeline_client: DataPipelineClient = boto3.client(\"datapipeline\")\n\nprint(\"Attempting to list DataPipeline pipelines:\")\ntry:\n    response = datapipeline_client.list_pipelines()\n    pipelines = response.get(\"pipelineIdList\", [])\n    if pipelines:\n        print(f\"Found {len(pipelines)} pipelines:\")\n        for pipeline_info in pipelines:\n            # Type checkers will enforce that 'id' and 'name' exist and are strings\n            print(f\"- ID: {pipeline_info['id']}, Name: {pipeline_info['name']}\")\n    else:\n        print(\"No DataPipeline pipelines found in this AWS account/region.\")\nexcept datapipeline_client.exceptions.ClientError as e:\n    print(f\"AWS Client Error: {e}\")\nexcept Exception as e:\n    print(f\"An unexpected error occurred: {e}\")\n\n# Mypy will now correctly check types for datapipeline_client methods.\n# For example, calling a non-existent method like 'datapipeline_client.non_existent_method()'\n# would raise a Mypy error during static analysis.","lang":"python","description":"This quickstart demonstrates how to initialize a `boto3` DataPipeline client and leverage `mypy-boto3-datapipeline` type stubs for static analysis. It shows the common pattern of obtaining a client via `boto3.client` and how to use `TYPE_CHECKING` for explicit type hints without runtime impact. Ensure both `boto3` and `mypy-boto3-datapipeline` are installed for this example to run and be type-checked."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or newer.","message":"Python 3.8 support was removed for `mypy-boto3-builder` in version 8.12.0. Consequently, `mypy-boto3-datapipeline` versions built with this builder (e.g., 1.42.3 and newer) require Python 3.9 or higher.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0 (and dependent mypy-boto3-* packages built with it)"},{"fix":"Update your import paths and `TypeDef` names according to the latest generated stubs. Consult the specific `type_defs.pyi` for the correct names.","message":"With `mypy-boto3-builder` 8.9.0, some `TypeDef` names were shortened (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`) or adjusted for conflicts (e.g., `CreateDistributionExtraRequestTypeDef` to `CreateDistributionRequestExtraTypeDef`). If you explicitly import and use these type definitions, your code might break.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.9.0 (and dependent mypy-boto3-* packages built with it)"},{"fix":"Ensure both `boto3` and `mypy-boto3-datapipeline` are installed (e.g., `pip install boto3 mypy-boto3-datapipeline`).","message":"These packages provide only type stubs for `boto3`. The `boto3` library itself is a separate runtime dependency and must be installed alongside `mypy-boto3-datapipeline` for your code to execute.","severity":"gotcha","affected_versions":"all"},{"fix":"Use type imports (`from typing import TYPE_CHECKING`) for explicit type hints to avoid unnecessary runtime imports.","message":"mypy-boto3 packages are exclusively for static type checking (e.g., with MyPy or Pyright) and do not modify the runtime behavior of the `boto3` library. They are purely for design-time analysis and do not need to be imported at runtime.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}