Registry / type-stubs / mypy-boto3-comprehend

mypy-boto3-comprehend

JSON →
library1.43.0pypypi✓ verified 24d ago

mypy-boto3-comprehend provides type annotations for the `boto3` Comprehend service, compatible with `mypy`, `pyright`, VSCode, PyCharm, and other tools. It is part of the `mypy-boto3` ecosystem, with its types automatically generated by `mypy-boto3-builder`. The library ensures that all public classes and methods of the `boto3` Comprehend service have valid, up-to-date type annotations extracted from `botocore` schemas, including documentation links. The project follows a frequent release cadence, often aligning with `boto3` updates.

pip install mypy-boto3-comprehend
INSTALL
IMPORT
SIG · MYPY-BOTO3-COMPREH
M
mypy-boto3-comprehend
type-stubspythonv1.43.0
Install
3.4s avg
Import
Disk
18MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 20.1MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 3.4s · import 0.000s · 21MB
18MB installed
● package 18MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ComprehendClient
from mypy_boto3_comprehend import ComprehendClient
from mypy_boto3_comprehend import ComprehendClient

This example demonstrates how to obtain a Comprehend client with and without explicit type annotations. Explicitly typing the client with `ComprehendClient` from `mypy_boto3_comprehend` provides full type checking and autocompletion for `boto3` operations on the Comprehend service.

import boto3 from mypy_boto3_comprehend import ComprehendClient from typing import TYPE_CHECKING # Boto3 client without explicit typing (type checkers may infer correctly) client = boto3.client("comprehend") client.detect_dominant_language(Text="Hello, this is a test.") # Explicit typing for better IDE support and type checking if TYPE_CHECKING: # In a real scenario, use actual AWS credentials # or ensure they are configured via environment variables or ~/.aws/credentials session = boto3.Session(region_name='us-east-1') # Or any appropriate region typed_client: ComprehendClient = session.client("comprehend") response = typed_client.detect_dominant_language(Text="Hola, esto es una prueba.") print(response['Languages'][0]['LanguageCode'])
Debug
Known issues
breakingPython 3.8 support has been removed across all `mypy-boto3-*` packages, including `mypy-boto3-comprehend`. Projects must use Python 3.9 or newer.
fix
Upgrade your Python environment to 3.9 or a later version.
affects: mypy-boto3-builder 8.12.0 and newer (affecting mypy-boto3-comprehend 1.42.3 and newer)
breakingAll `mypy-boto3-*` packages, including this one, migrated to PEP 561 compliant distribution. While this is a standard, older toolchains or custom stub paths might require adjustments.
fix
Ensure your `mypy` or `pyright` configuration and environment are up-to-date and correctly discover PEP 561 stubs. Typically no manual fix is needed for modern setups.
affects: mypy-boto3-builder 8.12.0 and newer (affecting mypy-boto3-comprehend 1.42.3 and newer)
gotchaThis package provides *only* type annotations. The `boto3` library itself must be installed in your environment for the code to run. Installing `mypy-boto3-comprehend` does not install `boto3`.
fix
Ensure `pip install boto3` is executed in your project's environment alongside this stub package.
affects: All versions
gotchaPyCharm users may experience slow performance or high CPU usage with `boto3-stubs` packages (which `mypy-boto3-comprehend` is part of, or can be installed as an extra). This is due to PyCharm's internal type checker handling of Literal overloads.
fix
Consider using `boto3-stubs-lite` instead (e.g., `pip install 'boto3-stubs-lite[comprehend]'`), disabling PyCharm's internal type checker and relying on `mypy` or `pyright` directly, or explicitly typing `session.client()` and `session.resource()` calls.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredProvides the AWS SDK runtime library that these type annotations are for. Must be installed separately.
mypyoptionalStatic type checker to utilize these annotations. Alternatively, pyright or an IDE with type checking support can be used.
Agent activity
18 hits · last 30 days
node
16
Resources
mypy-boto3-comprehend — pip install mypy-boto3-comprehend · libregistry