{"id":3355,"library":"mypy-boto3-deadline","title":"mypy-boto3-deadline: AWS Deadline Cloud Type Stubs","description":"mypy-boto3-deadline provides static type annotations for the `boto3` AWS SDK's DeadlineCloud service, generated with mypy-boto3-builder 8.12.0. It enhances developer experience by enabling comprehensive type checking, improved IDE auto-completion, and early error detection for `boto3` code interacting with AWS Deadline Cloud. The current version is 1.42.84, with active development following `boto3` updates and new AWS service releases.","status":"active","version":"1.42.84","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["aws","boto3","mypy","type-hints","deadlinecloud","stubs","static-analysis"],"install":[{"cmd":"pip install mypy-boto3-deadline boto3 mypy","lang":"bash","label":"Install service stubs, boto3 runtime, and mypy"},{"cmd":"pip install 'boto3-stubs[deadline]' boto3 mypy","lang":"bash","label":"Alternative via boto3-stubs extras"}],"dependencies":[{"reason":"Runtime dependency for AWS SDK functionality. mypy-boto3-deadline only provides type stubs.","package":"boto3","optional":false},{"reason":"Static type checker, the primary consumer of these type stubs.","package":"mypy","optional":true}],"imports":[{"note":"Imports the type for the DeadlineCloud client.","symbol":"DeadlineCloudClient","correct":"from mypy_boto3_deadline.client import DeadlineCloudClient"},{"note":"Imports specific TypedDict definitions for API call parameters or responses. Check official documentation for specific TypeDefs.","symbol":"AcceleratorCountRangeTypeDef","correct":"from mypy_boto3_deadline.type_defs import AcceleratorCountRangeTypeDef"}],"quickstart":{"code":"import boto3\nfrom typing import TYPE_CHECKING\n\nif TYPE_CHECKING:\n    from mypy_boto3_deadline.client import DeadlineCloudClient\n    from mypy_boto3_deadline.type_defs import ListFleetsResponseTypeDef\n\ndef list_deadline_fleets() -> ListFleetsResponseTypeDef:\n    # Using type hint for the client provides auto-completion and type checking\n    client: DeadlineCloudClient = boto3.client(\"deadline\")\n    response = client.list_fleets()\n    print(f\"Found {len(response['fleets'])} fleets.\")\n    return response\n\nif __name__ == \"__main__\":\n    # This part runs only if the script is executed, not during type checking\n    # Replace with actual API calls or mock data for testing\n    try:\n        fleets_data = list_deadline_fleets()\n        # Access type-hinted data, e.g., fleets_data['nextToken']\n    except Exception as e:\n        print(f\"Error listing fleets: {e}\")","lang":"python","description":"This quickstart demonstrates how to use `mypy-boto3-deadline` to add type hints to your `boto3` DeadlineCloud client. It uses `TYPE_CHECKING` for conditional imports, ensuring the type stubs are only used during static analysis and not bundled with runtime dependencies. It then retrieves a list of Deadline Cloud fleets with full type-hinting support."},"warnings":[{"fix":"Upgrade your Python environment to version 3.9 or newer.","message":"Support for Python 3.8 has been removed in `mypy-boto3-builder` version 8.12.0, affecting all generated packages including `mypy-boto3-deadline`. Projects using Python 3.8 or older will encounter compatibility issues.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0"},{"fix":"Review your code for any explicit imports or usage of `TypeDef` names, and update them according to the new naming conventions. Refer to the specific service's documentation for exact `TypeDef` names.","message":"Generated `TypeDef` names may have changed in `mypy-boto3-builder` version 8.9.0. Specifically, packed method arguments use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` to `CreateDistributionRequestTypeDef`), and conflicting `Extra` postfixes were moved (e.g., `CreateDistributionExtraRequestTypeDef` to `CreateDistributionRequestExtraTypeDef`).","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.9.0"},{"fix":"Always ensure `boto3` is installed in your runtime environment (e.g., `pip install boto3`). Consider using `if TYPE_CHECKING:` blocks for type stub imports to avoid unnecessary runtime dependencies.","message":"`mypy-boto3-deadline` provides only type stubs and does not include the actual `boto3` runtime. Your application must have `boto3` installed to function at runtime. The type stubs are solely for static analysis.","severity":"gotcha","affected_versions":"All"},{"fix":"Consider installing the `boto3-stubs-lite` version (e.g., `pip install 'boto3-stubs-lite[deadline]'`) if available for your service, which is more RAM-friendly but requires explicit type annotations. Alternatively, disable PyCharm's internal type checker and use `mypy` or `pyright` instead for type checking.","message":"For large projects or when using PyCharm, performance issues with Literal overloads in type stubs (issue PY-40997) might lead to high CPU usage or slow IDE performance. This is a known issue affecting `boto3-stubs` and related packages.","severity":"gotcha","affected_versions":"All, specifically affects PyCharm users."},{"fix":"To fix this, set all types to `object` in non-`TYPE_CHECKING` mode. For example: `if TYPE_CHECKING: from mypy_boto3_ec2.client import EC2Client else: EC2Client = object`.","message":"When using `mypy-boto3` stubs with `pylint`, you might encounter 'undefined variable' warnings for type-hinted variables. This is a known interaction issue when `TYPE_CHECKING` blocks are used without runtime fallback.","severity":"gotcha","affected_versions":"All, specifically affects Pylint users."}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}