mypy-boto3-cloudhsmv2 provides type annotations (stubs) for the `boto3` AWS SDK, specifically for the CloudHSMV2 service. It enhances development experience by enabling static type checking for `boto3` clients and responses. The library is currently at version 1.42.3, with releases closely mirroring `boto3` service updates and more frequent updates for the underlying `mypy-boto3-builder`.
pip install mypy-boto3-cloudhsmv2Verified import paths — ran on the pinned version, not inferred.
This example demonstrates how to use `mypy-boto3-cloudhsmv2` for type-hinted interaction with the CloudHSMV2 service. It shows how to obtain a type-annotated client and call an operation (`describe_clusters`), with type checkers verifying argument and return types. For actual execution, ensure AWS credentials are configured in your environment.
Upgrade your Python environment to 3.9 or higher. For Python 3.8 support, pin to a version <8.12.0 if compatible with your boto3 version.
Review your code for direct references to `mypy-boto3` generated TypedDict names and update them according to the new conventions. Consult the specific service's `mypy-boto3` package `type_defs.pyi` for current names.
Ensure `boto3` is installed in your environment: `pip install boto3`.
Ideally, align `mypy-boto3-cloudhsmv2` with your `boto3` version. `mypy-boto3` packages are typically generated to match specific `boto3` versions (as indicated in their summary/description).
Install `mypy` (or another compatible type checker) with `pip install mypy` and integrate it into your development workflow (e.g., `mypy your_script.py`).