Registry /
type-stubs / mypy-boto3-connect-contact-lens
Install & Compatibility
Where this runs
tested against v1.43.79 · 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.000s · 18.2MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ConnectContactLensClient
✓ from mypy_boto3_connect_contact_lens import ConnectContactLensClient
✗ from mypy_boto3_connect_contact_lens import ConnectContactLensClient
This quickstart demonstrates how to initialize a `ConnectContactLensClient` with type hints and use it. `mypy` will automatically pick up the stubs for `boto3.client`, but explicit imports for the client type and TypeDefs are shown for clarity and comprehensive type checking.
import boto3
from mypy_boto3_connect_contact_lens.client import ConnectContactLensClient
from mypy_boto3_connect_contact_lens.type_defs import ListRealtimeContactAnalysisSegmentsRequestRequestTypeDef
import os
# mypy will infer the type from boto3.client if stubs are installed
client: ConnectContactLensClient = boto3.client(
"connect-contact-lens",
aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID', 'DUMMY_KEY'),
aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY', 'DUMMY_SECRET'),
region_name=os.environ.get('AWS_REGION', 'us-east-1')
)
def list_segments(client: ConnectContactLensClient):
params: ListRealtimeContactAnalysisSegmentsRequestRequestTypeDef = {
"InstanceId": "your-instance-id", # Replace with your Connect instance ID
"ContactId": "your-contact-id" # Replace with a valid Contact ID
}
try:
response = client.list_realtime_contact_analysis_segments(**params)
print("Segments found:", response.get("Segments", []))
except client.exceptions.ResourceNotFoundException:
print("Instance or Contact not found. Please provide valid IDs.")
except Exception as e:
print(f"An error occurred: {e}")
# Example usage (requires valid AWS credentials and resource IDs for actual execution)
# list_segments(client)
Debug
Known issues
breakingSupport for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0 (which generates these stubs). Projects using this library now require Python 3.9 or newer.fixUpgrade your Python environment to 3.9 or later. If you need Python 3.8, you must use older versions of `mypy-boto3` stubs and the builder.
affects: mypy-boto3-builder >= 8.12.0, mypy-boto3-* corresponding versions
breakingSeveral TypeDef naming conventions changed in `mypy-boto3-builder` version 8.9.0. Specifically, argument TypeDefs were shortened (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`) and conflicting `Extra` postfixes moved to the end (e.g., `CreateDistributionExtraRequestTypeDef` became `CreateDistributionRequestExtraTypeDef`).fixUpdate direct imports of affected TypeDefs in your code to use the new naming conventions. Consult the `mypy-boto3-builder` changelog for specific changes if migrating from older versions.
affects: mypy-boto3-builder >= 8.9.0, mypy-boto3-* corresponding versions
gotchamypy-boto3 stubs are designed to match specific `boto3` versions. To ensure correct type checking, you should always keep your `mypy-boto3-*` packages in sync with your installed `boto3` version.fixRegularly update both `boto3` and its corresponding `mypy-boto3-*` stub packages. For example, if you have `boto3==1.28.0`, install `mypy-boto3==1.28.0` and `mypy-boto3-connect-contact-lens==1.28.0`.
affects: All versions
gotchaWhen using `boto3.client('service-name')`, `mypy` will automatically pick up the installed type stubs, so explicit `from mypy_boto3_service_name.client import ServiceClient` imports are not strictly required for basic client usage. However, for accessing specific `TypeDef` classes or for clearer function signatures, explicit imports are still necessary.fixFor basic client use, rely on `mypy`'s automatic stub discovery. For detailed type annotations involving `TypeDef`s or explicit client type declarations, import the specific types directly from the `mypy_boto3_service_name` package.
affects: All versions
Upgrade
Version history
1.43.79latest on PyPI · released Aug 24, 2026
Audit
Dependencies
boto3requiredThese are type stubs for the boto3 library; boto3 itself must be installed to run code using these stubs.