{"id":3601,"library":"mypy-boto3-ivs","title":"Type annotations for boto3 IVS","description":"mypy-boto3-ivs provides PEP 561 compatible type annotations for the `boto3` AWS IVS (Amazon Interactive Video Service) service, enhancing Python development with static type checking and IDE auto-completion. It is part of the `mypy-boto3-builder` project, which automatically generates and releases stub packages in sync with `boto3` updates. The current version is 1.42.3, mirroring the `boto3` version it types.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["boto3","aws","ivs","mypy","type-annotations","stubs","typing"],"install":[{"cmd":"pip install mypy-boto3-ivs boto3","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"Provides the actual runtime functionality for AWS services. `mypy-boto3-ivs` only provides type stubs.","package":"boto3","optional":false}],"imports":[{"note":"Imports the typed client for IVS service.","symbol":"IVSClient","correct":"from mypy_boto3_ivs.client import IVSClient"},{"note":"Standard import for the boto3 library, which is typed by this package.","symbol":"boto3","correct":"import boto3"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_ivs.client import IVSClient\nimport os\n\n# Ensure boto3 is configured, e.g., via environment variables or ~/.aws/credentials\n# This example assumes credentials are set up for boto3\n\ndef get_ivs_channels():\n    # The client will be implicitly typed as IVSClient due to mypy-boto3-ivs\n    client: IVSClient = boto3.client(\"ivs\", region_name=os.environ.get('AWS_REGION', 'us-east-1'))\n    \n    try:\n        response = client.list_channels()\n        print(\"Successfully listed IVS channels.\")\n        for channel in response.get(\"channels\", []):\n            print(f\"  Channel ARN: {channel.get('arn')}, Name: {channel.get('name')}\")\n        return response.get(\"channels\", [])\n    except Exception as e:\n        print(f\"Error listing IVS channels: {e}\")\n        return []\n\nif __name__ == \"__main__\":\n    # Example usage\n    ivs_channels = get_ivs_channels()\n    if not ivs_channels:\n        print(\"No IVS channels found or an error occurred.\")","lang":"python","description":"This quickstart demonstrates how to initialize a typed IVS client using `boto3` and `mypy-boto3-ivs`, and then make a basic API call like `list_channels`. The `client: IVSClient` type hint ensures that type checkers (like Mypy or Pyright) provide accurate auto-completion and error checking for IVS-specific methods and response structures."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or a newer supported version.","message":"The underlying `mypy-boto3-builder` (version 8.12.0+) has removed support for Python 3.8. Projects relying on `mypy-boto3-ivs` must use Python 3.9 or newer.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.12.0, mypy-boto3-ivs corresponding versions"},{"fix":"Always install `boto3` alongside `mypy-boto3-ivs` (e.g., `pip install boto3 mypy-boto3-ivs`).","message":"`mypy-boto3-ivs` is a stub-only package (PEP 561). It provides type hints for `boto3`, but you must install `boto3` itself separately for runtime functionality. Installing only `mypy-boto3-ivs` will not allow you to interact with AWS services.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Review your code for any custom usage or introspection of `TypeDef` names and adjust to the new naming conventions.","message":"For those creating custom stubs or deeply inspecting generated types, `mypy-boto3-builder` version 8.9.0 introduced breaking changes to `TypeDef` naming conventions (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`).","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.9.0"},{"fix":"Consider installing `boto3-stubs-lite[ivs]` (or the general `boto3-stubs-lite`) instead of the full package, or disable PyCharm's internal type checker and rely on external tools like `mypy` or `pyright`.","message":"PyCharm users might experience slow performance with Literal overloads provided by `mypy-boto3` packages. As a workaround, the `boto3-stubs-lite` variants are recommended for better IDE responsiveness, though they might require more explicit type annotations.","severity":"gotcha","affected_versions":"All versions, specifically affecting PyCharm users"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}