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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.608s · 51.9MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.9s · import 0.552s · 52MB
50MB installed
● package 50MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
CloudSearchClient
✓ from mypy_boto3_cloudsearch import CloudSearchClient
Main client type for CloudSearch service.
OptionStatusTypeDef
✓ from mypy_boto3_cloudsearch.type_defs import OptionStatusTypeDef
Importing TypedDicts for structured input/output type checking.
AlgorithmicStemmingType
✓ from mypy_boto3_cloudsearch.literals import AlgorithmicStemmingType
Importing Literals for string-based enum type checking.
This example demonstrates how to initialize a `boto3` CloudSearch client and leverage the `mypy-boto3-cloudsearch` type annotations for static analysis. It includes an `if TYPE_CHECKING:` block, which is a common pattern to ensure the type stub imports do not create runtime dependencies.
import boto3
from typing import TYPE_CHECKING
# Only import type stubs during type checking to avoid runtime dependency
if TYPE_CHECKING:
from mypy_boto3_cloudsearch import CloudSearchClient
from mypy_boto3_cloudsearch.type_defs import DomainStatusTypeDef
def list_cloudsearch_domains(region_name: str = 'us-east-1') -> None:
# boto3 client is untyped by default without explicit type hints or stubs
client = boto3.client('cloudsearch', region_name=region_name)
# With mypy-boto3-cloudsearch, this client will be type-checked
if TYPE_CHECKING:
typed_client: CloudSearchClient = client
response: DomainStatusTypeDef = typed_client.describe_domains()
print(f"CloudSearch Domains: {response.get('DomainStatusList')}")
else:
# Runtime execution path
response = client.describe_domains()
print(f"CloudSearch Domains: {response.get('DomainStatusList')}")
# Example usage (will only execute at runtime if TYPE_CHECKING is False)
# For full functionality, you'll need AWS credentials configured.
# list_cloudsearch_domains()
Debug
Known issues
breakingAs of mypy-boto3-builder 8.12.0 (which generates this package), Python 3.8 is no longer supported. Ensure your project uses Python 3.9 or newer.fixUpgrade your Python environment to 3.9 or a later version.
affects: >=8.12.0 of mypy-boto3-builder and generated packages
breakingmypy-boto3-builder 8.9.0 introduced naming convention changes for TypeDefs (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). While not specific to CloudSearch in the release notes, similar changes may affect other services' TypeDefs, potentially requiring updates to explicit type hints.fixReview your code for explicit TypeDef annotations and adjust names according to the new conventions as indicated by your type checker.
affects: >=8.9.0 of mypy-boto3-builder and generated packages
gotchaThis package only provides type annotations. For your code to run, the `boto3` library must also be installed in your environment.fixEnsure `boto3` is included in your project's dependencies (e.g., `pip install boto3`).
affects: All versions
gotchaTo prevent type stub packages from becoming runtime dependencies, especially in production environments, it is recommended to wrap `mypy-boto3-cloudsearch` imports within a `if TYPE_CHECKING:` block.fixUse `from typing import TYPE_CHECKING` and conditional imports: `if TYPE_CHECKING: from mypy_boto3_cloudsearch import CloudSearchClient`.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredThis package provides type annotations for boto3; boto3 itself must be installed for runtime execution.