Registry /
type-stubs / mypy-boto3-cloudsearchdomain
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.574s · 51.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.9s · import 0.538s · 52MB
50MB installed
● package 50MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
CloudSearchDomainClient
✓ from mypy_boto3_cloudsearchdomain import CloudSearchDomainClient
CloudSearchDomainClient
✓ from mypy_boto3_cloudsearchdomain.client import CloudSearchDomainClient
This quickstart demonstrates how to initialize a type-hinted `CloudSearchDomainClient` and perform a basic search operation. Note that the CloudSearchDomain client typically requires a specific `endpoint_url` for operations like `search` and `upload_documents`. In a production environment, this endpoint is usually discovered via the `cloudsearch` configuration service. The example includes placeholders for the endpoint and highlights common setup requirements.
import os
import boto3
from mypy_boto3_cloudsearchdomain import CloudSearchDomainClient
# The CloudSearchDomain client often requires an explicit endpoint_url.
# In a real application, you would retrieve this dynamically from
# boto3.client("cloudsearch").describe_domains().
# Replace with your actual CloudSearch domain search endpoint URL or set as env var.
CLOUDSEARCH_DOMAIN_ENDPOINT = os.environ.get(
"CLOUDSEARCH_DOMAIN_ENDPOINT",
"https://search-your-domain-xyz.us-east-1.cloudsearch.amazonaws.com" # Placeholder
)
try:
# Create a type-hinted CloudSearchDomain client
client: CloudSearchDomainClient = boto3.client(
"cloudsearchdomain",
endpoint_url=CLOUDSEARCH_DOMAIN_ENDPOINT,
# region_name=os.environ.get("AWS_REGION", "us-east-1") # Optional
)
# Perform a dummy search operation (requires a valid domain and query)
# This call will likely fail if CLOUDSEARCH_DOMAIN_ENDPOINT is not valid or domain is empty.
response = client.search(
query="example",
queryParser="simple"
)
print(f"Search found {response.get('hits', {}).get('found', 0)} items.")
# Further operations with type-checked client...
except Exception as e:
print(f"An error occurred: {e}")
print("Ensure 'CLOUDSEARCH_DOMAIN_ENDPOINT' is set to a valid CloudSearch domain search endpoint.")
print("You might need to use `boto3.client('cloudsearch').describe_domains()` to obtain it.")
print("Also, verify AWS credentials are configured (e.g., via environment variables or ~/.aws/credentials).")
Debug
Known issues
breakingSupport for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0. Users on Python 3.8 should upgrade to Python 3.9 or newer.fixUpgrade your Python environment to 3.9 or a later version.
affects: >=8.12.0 of mypy-boto3-builder generated packages
breakingThe `mypy-boto3` project migrated to PEP 561-compliant packages starting with `mypy-boto3-builder` 8.12.0. This might change how some tools discover or interpret the stubs. If you encounter issues, ensure your type checker (e.g., MyPy) is up-to-date and correctly configured for PEP 561 packages.fixUpdate your type checker and build tools. Ensure `mypy` is configured to find namespace packages if applicable.
affects: >=8.12.0 of mypy-boto3-builder generated packages
breakingIn `mypy-boto3-builder` version 8.9.0, there were changes to how TypeDef names for packed method arguments are generated (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). If you directly import and reference these TypedDicts in your code, they might need renaming.fixReview and update `TypedDict` import paths and names in your codebase according to the latest generated stub files.
affects: >=8.9.0 of mypy-boto3-builder generated packages
gotchaThe `cloudsearchdomain` service client (`boto3.client('cloudsearchdomain')`) requires a domain-specific `endpoint_url` for operations like `search` and `upload_documents`. Without it, these calls will fail. The endpoint must be retrieved from the `cloudsearch` configuration service using `boto3.client('cloudsearch').describe_domains()`.fixAlways dynamically fetch the `endpoint_url` from the `cloudsearch` service using `describe_domains` and pass it to the `boto3.client('cloudsearchdomain', endpoint_url=...)` call. affects: All versions
gotchaThis package provides *only* type annotations (stubs). To actually run your code, you must also install the `boto3` library itself (`pip install boto3`).fixEnsure both `mypy-boto3-cloudsearchdomain` and `boto3` are installed in your environment.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredThese are type stubs for boto3; boto3 itself is required for runtime functionality.