{"id":3346,"library":"mypy-boto3-chime-sdk-voice","title":"mypy-boto3-chime-sdk-voice Type Annotations","description":"This library provides type annotations for the AWS boto3 Chime SDK Voice service client. It ensures that your boto3 calls for `chime-sdk-voice` are type-checked by `mypy`, preventing common runtime errors and improving developer experience with autocompletion. The current version is 1.42.3, generated by `mypy-boto3-builder` and released frequently to align with boto3/botocore updates.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["boto3","aws","mypy","type-hints","chime-sdk-voice","static-analysis"],"install":[{"cmd":"pip install mypy-boto3-chime-sdk-voice","lang":"bash","label":"Install specific service stubs"},{"cmd":"pip install mypy-boto3  # for all boto3 service stubs","lang":"bash","label":"Install all boto3 service stubs"}],"dependencies":[{"reason":"Runtime dependency for which these are type stubs.","package":"boto3","optional":false}],"imports":[{"note":"Type stubs are imported from the dedicated mypy-boto3 package, not directly from boto3.","wrong":"from boto3.client import ChimeSDKVoiceClient","symbol":"ChimeSDKVoiceClient","correct":"from mypy_boto3_chime_sdk_voice.client import ChimeSDKVoiceClient"},{"note":"Type definitions for service request/response parameters are found in the `type_defs` submodule.","symbol":"CreateVoiceProfileDomainRequestRequestTypeDef","correct":"from mypy_boto3_chime_sdk_voice.type_defs import CreateVoiceProfileDomainRequestRequestTypeDef"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_chime_sdk_voice.client import ChimeSDKVoiceClient\n\n# It's crucial to annotate the client variable for mypy to pick up the types\nclient: ChimeSDKVoiceClient = boto3.client(\"chime-sdk-voice\")\n\n# Now, 'client' methods are type-checked and offer autocompletion\ntry:\n    # Example: Listing voice profile domains\n    response = client.list_voice_profile_domains()\n    print(f\"Successfully listed voice profile domains. Found {len(response['VoiceProfileDomainSummaries'])}.\")\n    if response['VoiceProfileDomainSummaries']:\n        print(f\"First domain name: {response['VoiceProfileDomainSummaries'][0]['Name']}\")\nexcept Exception as e:\n    print(f\"Error listing domains (this is expected if AWS credentials/permissions are missing): {e}\")\n\n# You can also import and use specific TypedDicts for request/response bodies\n# from mypy_boto3_chime_sdk_voice.type_defs import CreateVoiceProfileDomainRequestRequestTypeDef\n# request_params: CreateVoiceProfileDomainRequestRequestTypeDef = {\n#     \"Name\": \"MyDomain\",\n#     \"ServerSideEncryptionConfiguration\": {\"KmsKeyArn\": \"arn:aws:kms:REGION:ACCOUNT_ID:key/KEY_ID\"}\n# }\n# client.create_voice_profile_domain(**request_params)","lang":"python","description":"This quickstart demonstrates how to get a type-hinted ChimeSDKVoice client using `mypy-boto3-chime-sdk-voice` and perform a basic operation. The explicit type annotation `client: ChimeSDKVoiceClient` is essential for mypy to correctly apply the type information."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or newer. If you must use Python 3.8, pin `mypy-boto3-builder` and related stub packages to a version older than 8.12.0.","message":"Starting with `mypy-boto3-builder` version 8.12.0 (which generates this stub package), Python 3.8 is no longer supported. Ensure your projects are running Python 3.9 or higher.","severity":"breaking","affected_versions":"<8.12.0"},{"fix":"Update your code to use the new, shorter TypedDict names where applicable. Consult the `type_defs` submodule for the correct name.","message":"In builder version 8.9.0, there was a breaking change in how some TypedDict names are generated, specifically for packed method arguments. Names like `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`.","severity":"breaking","affected_versions":"<8.9.0"},{"fix":"Keep `mypy-boto3-chime-sdk-voice` and `boto3` updated in sync. If using `pip`, you can often update both with `pip install --upgrade boto3 mypy-boto3-chime-sdk-voice`.","message":"For optimal type checking, the version of `mypy-boto3-chime-sdk-voice` should ideally match the major/minor version of your installed `boto3` library. Significant mismatches can lead to incorrect type hints or missing attributes.","severity":"gotcha","affected_versions":"all"},{"fix":"Always add a type hint for the client variable when initializing it: `client: SpecificServiceClient = boto3.client('service-name')`.","message":"When using `boto3.client('service-name')`, it's critical to explicitly type-annotate the returned client object (e.g., `client: ChimeSDKVoiceClient = boto3.client('chime-sdk-voice')`) for mypy to apply the stub types. Without this annotation, mypy treats the client as `Any`.","severity":"gotcha","affected_versions":"all"},{"fix":"Choose one approach: either install `mypy-boto3` for all services OR install individual `mypy-boto3-SERVICE` packages for only the services you use. Do not install both simultaneously for the same services.","message":"If you install the general `mypy-boto3` package, it includes stubs for ALL AWS services. Installing service-specific packages (like `mypy-boto3-chime-sdk-voice`) alongside `mypy-boto3` is redundant and can lead to conflicts or larger dependency trees than necessary.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}