{"id":3345,"library":"mypy-boto3-chime-sdk-messaging","title":"mypy-boto3-chime-sdk-messaging","description":"mypy-boto3-chime-sdk-messaging provides type annotations for the boto3 ChimeSDKMessaging service, enhancing development with static type checking in environments like VSCode, PyCharm, and mypy. It is generated by `mypy-boto3-builder` (currently version 8.12.0) and closely tracks the `boto3` release cycle, with frequent updates to ensure compatibility and comprehensive type hints. The current version is 1.42.3.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["aws","boto3","mypy","type-hints","stubs","chime-sdk-messaging","chime","messaging"],"install":[{"cmd":"pip install mypy-boto3-chime-sdk-messaging boto3","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"Provides the AWS SDK for Python, which this library provides type stubs for.","package":"boto3","optional":false},{"reason":"May be required for older Python versions (e.g., <3.9) to support modern typing features used by the stubs.","package":"typing-extensions","optional":true}],"imports":[{"note":"Import specific client type for type checking.","symbol":"ChimeSDKMessagingClient","correct":"from mypy_boto3_chime_sdk_messaging.client import ChimeSDKMessagingClient"},{"note":"Import specific TypeDef for detailed response type hinting.","symbol":"CreateChannelMessageResponseTypeDef","correct":"from mypy_boto3_chime_sdk_messaging.type_defs import CreateChannelMessageResponseTypeDef"}],"quickstart":{"code":"import boto3\nfrom typing import TYPE_CHECKING\n\nif TYPE_CHECKING:\n    from mypy_boto3_chime_sdk_messaging.client import ChimeSDKMessagingClient\n    from mypy_boto3_chime_sdk_messaging.type_defs import CreateChannelMessageResponseTypeDef\n\n\ndef send_chime_message(channel_arn: str, content: str, app_instance_user_arn: str) -> 'CreateChannelMessageResponseTypeDef':\n    client: ChimeSDKMessagingClient = boto3.client(\"chime-sdk-messaging\", region_name=\"us-east-1\")\n    response = client.create_channel_message(\n        ChannelArn=channel_arn,\n        Content=content,\n        MessageType=\"STANDARD\",\n        AppInstanceUserArn=app_instance_user_arn\n    )\n    print(f\"Message ID: {response.get('ChannelMessage', {}).get('MessageId')}\")\n    return response\n\n# Example usage (replace with actual values for a runnable example)\n# if __name__ == \"__main__\":\n#     CHANNEL_ARN = os.environ.get('CHIME_CHANNEL_ARN', 'arn:aws:chime:us-east-1:123456789012:app-instance/xxxx/channel/yyyy')\n#     CONTENT = \"Hello from mypy-boto3!\"\n#     APP_INSTANCE_USER_ARN = os.environ.get('CHIME_APP_INSTANCE_USER_ARN', 'arn:aws:chime:us-east-1:123456789012:app-instance-user/zzzz')\n#\n#     if CHANNEL_ARN and APP_INSTANCE_USER_ARN:\n#         message_response = send_chime_message(CHANNEL_ARN, CONTENT, APP_INSTANCE_USER_ARN)\n#         print(message_response)\n#     else:\n#         print(\"Please set CHIME_CHANNEL_ARN and CHIME_APP_INSTANCE_USER_ARN environment variables.\")","lang":"python","description":"This quickstart demonstrates how to use the `ChimeSDKMessagingClient` with type hints for a `create_channel_message` operation. The `TYPE_CHECKING` guard ensures that `mypy-boto3-chime-sdk-messaging` is only a development dependency."},"warnings":[{"fix":"Upgrade Python to 3.9 or newer. If building stubs locally, pin `mypy-boto3-builder` to `<8.12.0`.","message":"Python 3.8 support has been removed by `mypy-boto3-builder` (version 8.12.0). Projects using Python 3.8 will need to upgrade their Python version or use an older `mypy-boto3-builder` version if building stubs locally.","severity":"breaking","affected_versions":"mypy-boto3-builder>=8.12.0"},{"fix":"Ensure your `pyproject.toml` or `setup.py` correctly declares `mypy-boto3-chime-sdk-messaging` as a typing-only dependency (e.g., in a `[tool.mypy]` section or `extra_requires` for `dev`).","message":"The `mypy-boto3-builder` (version 8.12.0) migrated to PEP 561 compliant packages. This might require updates to how type checkers resolve stubs, especially in complex project setups.","severity":"breaking","affected_versions":"mypy-boto3-builder>=8.12.0"},{"fix":"Update imports and references to affected TypeDef names according to the new naming conventions.","message":"In `mypy-boto3-builder` (version 8.9.0), TypeDef names for packed method arguments were shortened (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`), and conflicting `Extra` postfixes were moved (e.g., `CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`). This affects explicit imports of such TypeDefs.","severity":"breaking","affected_versions":"mypy-boto3-builder>=8.9.0"},{"fix":"Wrap type-specific imports (e.g., `from mypy_boto3_chime_sdk_messaging.client import ChimeSDKMessagingClient`) inside `if TYPE_CHECKING:` blocks.","message":"To avoid installing `mypy-boto3-chime-sdk-messaging` as a runtime dependency, it is best practice to import specific types within an `if TYPE_CHECKING:` block. This keeps your production environment lighter.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Use `boto3-stubs-lite` variants or consider disabling PyCharm's internal type checker and using `mypy` or `pyright` externally.","message":"PyCharm users might experience slow performance with `Literal` overloads in `mypy-boto3` packages (due to issue PY-40997). For large projects or if performance is an issue, consider using the 'lite' versions (e.g., `boto3-stubs-lite`) which are more RAM-friendly but may require more explicit type annotations.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Refer to the `mypy-boto3` documentation or `mypy-boto3-builder` changelog for updates on service package names following `boto3` releases.","message":"Service names can be renamed or excluded by the `mypy-boto3-builder`. For example, `sms-voice` was removed in builder version 8.11.0. While this specific package is for Chime SDK Messaging, users should be aware that service name changes in `boto3` or `botocore` may lead to corresponding changes in `mypy-boto3` package names.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}