{"id":3039,"library":"mypy-boto3-chime","title":"mypy-boto3-chime","description":"mypy-boto3-chime provides comprehensive type annotations for the AWS Boto3 Chime service, enabling static type checking with tools like MyPy. It enhances code quality, readability, and error detection for Boto3 interactions. The library is currently at version 1.42.3 and is automatically generated by the mypy-boto3-builder.","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","chime","stubs","static-analysis"],"install":[{"cmd":"pip install mypy-boto3-chime boto3","lang":"bash","label":"Install library and Boto3"}],"dependencies":[{"reason":"This package provides type stubs for boto3, so boto3 itself is a mandatory runtime dependency for its functionality.","package":"boto3","optional":false},{"reason":"Required for static type checking; this package provides the type definitions for it.","package":"mypy","optional":true}],"imports":[{"note":"The `boto3` client is dynamically typed; `mypy_boto3_chime.client` provides the static type definition.","wrong":"from boto3.client import ChimeClient","symbol":"ChimeClient","correct":"from mypy_boto3_chime.client import ChimeClient"},{"note":"For precise type checking of Boto3 operation responses, import the specific `TypedDict`.","wrong":"import boto3; client.list_accounts() # No explicit type for response","symbol":"ListAccountsOutputTypeDef","correct":"from mypy_boto3_chime.type_defs import ListAccountsOutputTypeDef"},{"note":"Use literal types for stricter validation of string-based enum values defined by AWS.","wrong":"status: str = 'Active'","symbol":"AccountStatusType","correct":"from mypy_boto3_chime.literals import AccountStatusType"}],"quickstart":{"code":"from typing import TYPE_CHECKING\nimport boto3\n\nif TYPE_CHECKING:\n    from mypy_boto3_chime.client import ChimeClient\n    from mypy_boto3_chime.type_defs import ListAccountsOutputTypeDef\n\ndef get_chime_accounts() -> list[dict]:\n    # The client variable is type-hinted for MyPy/IDE support\n    client: \"ChimeClient\" = boto3.client(\"chime\")\n    \n    # The response can also be type-hinted for stricter checking\n    response: \"ListAccountsOutputTypeDef\" = client.list_accounts(\n        MaxResults=5, \n        NextToken='' # Simulate optional token, use os.environ.get('NEXT_TOKEN', '') for real-world scenarios\n    )\n    return response.get(\"Accounts\", [])\n\nif __name__ == \"__main__\":\n    accounts = get_chime_accounts()\n    print(f\"Found {len(accounts)} Chime accounts.\")\n    for account in accounts:\n        print(f\"  Account ID: {account.get('AccountId')}, Name: {account.get('Name')}\")","lang":"python","description":"This quickstart demonstrates how to initialize a type-hinted Boto3 Chime client and call an operation like `list_accounts`. It shows how to import the `ChimeClient` type and optionally type-hint the response using `TypedDict` from `mypy_boto3_chime.type_defs`. The `TYPE_CHECKING` block ensures that the stub-only imports are not part of the runtime dependency."},"warnings":[{"fix":"Upgrade your Python environment to version 3.9 or newer. Ensure your `requires_python` matches the library's requirements.","message":"Support for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0. This affects all generated `mypy-boto3` stub packages, including `mypy-boto3-chime`.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.12.0"},{"fix":"Migrate to `types-boto3` for general Boto3 stubs or install specific service packages like `mypy-boto3-chime` directly.","message":"The legacy `mypy-boto3` project was moved to a separate product in `mypy-boto3-builder` version 8.9.0. Users relying on the older `mypy-boto3` package for broad stub coverage may experience issues.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.9.0"},{"fix":"Review your `type_defs` imports and update usage to reflect the new naming conventions.","message":"Type definition names for method arguments (e.g., `CreateDistributionRequestRequestTypeDef` to `CreateDistributionRequestTypeDef`) and `Extra` postfix positioning were changed in `mypy-boto3-builder` version 8.9.0. This can cause type checking errors for existing code.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.9.0"},{"fix":"Ensure `boto3` is installed in your environment: `pip install boto3`.","message":"This package only provides type annotations. You must install the `boto3` library separately for runtime functionality.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Install and configure `mypy` or `pyright` in your development environment. Refer to their respective documentation for setup instructions.","message":"For static type checking to be effective, you need to configure a type checker like MyPy or Pyright in your project. This package provides the stubs, but the type checker performs the analysis.","severity":"gotcha","affected_versions":"All versions"},{"fix":"If your project relies on `sms-voice` stubs, migrate to `mypy-boto3-pinpoint-sms-voice` (or `boto3-stubs[pinpoint-sms-voice]`) and adjust your Boto3 client calls accordingly.","message":"The `sms-voice` service was excluded from `mypy-boto3-builder` version 8.11.0 and is no longer supported. Users should use `pinpoint-sms-voice` instead. While this specific package is for Chime, it indicates a pattern of service name changes in the broader `mypy-boto3` ecosystem.","severity":"deprecated","affected_versions":"mypy-boto3-builder >=8.11.0"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}