mypy-boto3-marketplace-deployment Type Stubs

1.42.3 · active · verified Sat Apr 11

mypy-boto3-marketplace-deployment provides machine-generated type annotations (type stubs) for the `boto3` AWS SDK's MarketplaceDeploymentService. These stubs enhance static analysis, autocompletion, and error checking in IDEs and type checkers like MyPy, ensuring more robust and maintainable AWS automation scripts. The library is currently at version 1.42.3, mirroring the `boto3` version it types, and is actively maintained with updates generated by `mypy-boto3-builder`.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to import and use the type-hinted `MarketplaceDeploymentServiceClient` with `boto3`. It includes the recommended `if TYPE_CHECKING` block to ensure type imports are only active during static analysis, avoiding runtime dependencies on the stub package.

import boto3
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from mypy_boto3_marketplace_deployment import MarketplaceDeploymentServiceClient
    from mypy_boto3_marketplace_deployment.type_defs import DeploymentParameterInputTypeDef


def get_marketplace_deployment_client() -> 'MarketplaceDeploymentServiceClient':
    """Returns a type-hinted MarketplaceDeploymentService client."""
    # boto3.client is dynamically typed, mypy-boto3 provides the static types
    return boto3.client("marketplace-deployment") # type: ignore[return-value]

def process_deployment_parameters(client: 'MarketplaceDeploymentServiceClient') -> None:
    """Example of using the client with typed input."""
    # Example of a typed dictionary for input (replace with actual data)
    deployment_param: DeploymentParameterInputTypeDef = {
        "name": "ExampleParam",
        "value": "ExampleValue"
    }
    # In a real scenario, you'd call a client method here, e.g., client.SomeOperation(**deployment_param)
    print(f"Processing deployment parameter: {deployment_param['name']}")

if __name__ == "__main__":
    client = get_marketplace_deployment_client()
    process_deployment_parameters(client)

view raw JSON →