mypy-boto3-deadline: AWS Deadline Cloud Type Stubs

1.42.84 · active · verified Sat Apr 11

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.

Warnings

Install

Imports

Quickstart

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.

import boto3
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from mypy_boto3_deadline.client import DeadlineCloudClient
    from mypy_boto3_deadline.type_defs import ListFleetsResponseTypeDef

def list_deadline_fleets() -> ListFleetsResponseTypeDef:
    # Using type hint for the client provides auto-completion and type checking
    client: DeadlineCloudClient = boto3.client("deadline")
    response = client.list_fleets()
    print(f"Found {len(response['fleets'])} fleets.")
    return response

if __name__ == "__main__":
    # This part runs only if the script is executed, not during type checking
    # Replace with actual API calls or mock data for testing
    try:
        fleets_data = list_deadline_fleets()
        # Access type-hinted data, e.g., fleets_data['nextToken']
    except Exception as e:
        print(f"Error listing fleets: {e}")

view raw JSON →