types-boto3-comprehend

raw JSON →
1.43.0 verified Fri May 01 auth: no python

Type annotations for boto3 Comprehend 1.43.0 service, generated with mypy-boto3-builder 8.12.0. Version 1.43.0 supports Python >=3.9. Provides static type checking for Amazon Comprehend client operations, service resources, and paginators. Part of the mypy-boto3-builder ecosystem. Release cadence follows boto3 service updates.

pip install types-boto3-comprehend
error Cannot find reference 'ComprehendClient' in '__init__.py'
cause IDE or type checker is looking at the wrong stub package, possibly due to incorrect deployment of stubs or missing 'mypy_boto3_comprehend' in type-checker paths.
fix
Install the correct package: pip install types-boto3-comprehend. Ensure your type checker configuration includes the package (e.g., mypy: follows imports).
error ModuleNotFoundError: No module named 'mypy_boto3_comprehend'
cause The user tried to import 'mypy_boto3_comprehend' without installing the package, or confusion between PyPI package name and module name.
fix
Install the package: pip install types-boto3-comprehend. The import module is 'mypy_boto3_comprehend'.
breaking Python 3.8 support removed since mypy-boto3-builder 8.12.0 (v1.43.0). Requires Python >=3.9.
fix Upgrade to Python 3.9+.
gotcha The import module is 'mypy_boto3_comprehend', not 'types_boto3_comprehend'. The PyPI package name differs from the Python module name. Many users mistakenly try to import from the package name.
fix Use 'from mypy_boto3_comprehend import ...' instead.
deprecated TypeDef names may change between major versions of mypy-boto3-builder (e.g., shortened names in v8.9.0). In Comprehend, this affects some nested Request/Response TypeDefs.
fix Check the generated TypeDef names after upgrading; use IDE type hints to discover new names.

Type-annotated Comprehend client usage. Assumes boto3 and valid AWS credentials are configured.

import boto3
from mypy_boto3_comprehend import ComprehendClient

client: ComprehendClient = boto3.client('comprehend', region_name='us-east-1')
# Example: detect dominant language
response = client.detect_dominant_language(Text='Hello world')
print(response['Languages'])