mypy-boto3-comprehendmedical provides comprehensive type annotations (stubs) for the boto3 ComprehendMedical client. Generated by `mypy-boto3-builder`, this package enhances development with static type checking, improved IDE auto-completion, and early error detection for your AWS ComprehendMedical interactions. It closely tracks `boto3` releases, with the current version being 1.42.3, compatible with boto3 1.42.3 and generated by builder 8.12.0.
pip install mypy-boto3-comprehendmedical boto3 mypyVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize a type-hinted ComprehendMedical client and use one of its methods, `detect_entities_v2`. It uses `TYPE_CHECKING` for conditional imports, ensuring the stubs are only active during type checking.
Upgrade your Python environment to 3.9 or newer. If you must use Python 3.8, pin your `mypy-boto3-comprehendmedical` version to an older compatible release.
Ensure `mypy` is up-to-date and that stub packages are installed in the same Python environment used by `mypy`. Avoid relying on `MYPYPATH` for stub-only packages; they should be installed via `pip`.
Always install `boto3` alongside `mypy-boto3-comprehendmedical` (e.g., `pip install boto3 mypy-boto3-comprehendmedical`).
Integrate `mypy` into your CI/CD pipeline or use it during development (`mypy your_project/`). Ensure your IDE is configured to use type checking (e.g., Pylance in VSCode, Mypy plugin in PyCharm).
Regularly update both `boto3` and its corresponding `mypy-boto3-comprehendmedical` stub package. Consider pinning versions in your `requirements.txt` (e.g., `boto3==1.42.3`, `mypy-boto3-comprehendmedical==1.42.3`).