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.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.8MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 3.4s · import 0.000s · 20MB
18MB installed
● package 18MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
VoiceIDClient
✓ from mypy_boto3_voice_id import VoiceIDClient
✗ from mypy_boto3_voice_id import VoiceIDClient
This quickstart demonstrates how to use `mypy-boto3-voice-id` for type-hinting a `boto3` Voice ID client and its responses. It utilizes a `TYPE_CHECKING` guard to ensure the type stubs are only used during static analysis, preventing a runtime dependency in production environments.
import boto3
from typing import TYPE_CHECKING
# Recommended: Use TYPE_CHECKING to avoid runtime dependency on mypy-boto3-voice-id
if TYPE_CHECKING:
from mypy_boto3_voice_id.client import VoiceIDClient
from mypy_boto3_voice_id.type_defs import ListDomainsResponseTypeDef
def list_voice_id_domains():
# Type-hint the boto3 client for static analysis
client: VoiceIDClient = boto3.client("voice-id")
# The response will also be type-checked
response: ListDomainsResponseTypeDef = client.list_domains()
print("Voice ID Domains:")
for domain in response.get("DomainSummaries", []):
print(f" ID: {domain['DomainId']}, Name: {domain['Name']}")
if __name__ == "__main__":
# Ensure AWS credentials are configured (e.g., via AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
# or AWS CLI config for this to run successfully.
list_voice_id_domains()
Debug
Known issues
breakingThe underlying `mypy_boto3_builder` project (which generates this package) removed support for Python 3.8 in version 8.12.0. `mypy-boto3-voice-id` versions generated with `builder` 8.12.0 or newer require Python 3.9 or higher.fixUpgrade your Python environment to 3.9 or newer. Consider pinning to an older `mypy-boto3-voice-id` version if Python 3.8 is strictly required (though this is not recommended).
affects: >=1.42.3 (generated with builder 8.12.0)
breakingIn `mypy_boto3_builder` version 8.9.0, the naming convention for TypeDefs used for packed method arguments was shortened. For example, `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`. This affects explicit type hints in your code.fixReview and update explicit `TypeDef` annotations in your code to match the new, shorter names. Consult the specific service documentation for the exact `TypeDef` names.
affects: >=1.42.0 (generated with builder 8.9.0)
gotchaWhen using `TYPE_CHECKING` guards to conditionally import type stubs (a common pattern for production deployments), Pylint may report `undefined-variable` errors for the type-hinted objects.fixTo resolve Pylint issues, set the type-hinted variables to `object` in the `else` branch of the `TYPE_CHECKING` block. Example: `if TYPE_CHECKING: from mypy_boto3_ec2.client import EC2Client else: EC2Client = object`.
affects: All versions
gotchaPyCharm has known performance issues when dealing with Python's `Literal` overloads, which are extensively used in `mypy-boto3` type stubs. This can lead to slower IDE performance.fixIf experiencing performance issues in PyCharm, consider installing the 'lite' version of `boto3-stubs` (e.g., `pip install boto3-stubs-lite[voice-id]`) which provides a more lightweight set of type annotations, albeit with some reduced granularity.
affects: All versions (PyCharm specific)
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3optionalThis package provides type hints for boto3, so boto3 is required at runtime for the actual AWS API calls.