{"id":3611,"library":"mypy-boto3-kinesisvideo","title":"mypy-boto3-kinesisvideo","description":"mypy-boto3-kinesisvideo provides type annotations for the `boto3` KinesisVideo service, ensuring type compatibility with tools like mypy, VSCode, and PyCharm. It is automatically generated by `mypy-boto3-builder` and released frequently, often in sync with `boto3` updates to maintain accurate type hints for the latest AWS API specifications. 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":["boto3","aws","type-hinting","mypy","kinesisvideo","stubs"],"install":[{"cmd":"pip install mypy-boto3-kinesisvideo","lang":"bash","label":"Install service-specific stubs"},{"cmd":"pip install boto3-stubs[kinesisvideo]","lang":"bash","label":"Install via boto3-stubs extras"}],"dependencies":[{"reason":"mypy-boto3-builder dropped support for Python 3.8 in version 8.12.0.","package":"python","optional":false},{"reason":"This library provides type annotations for boto3; boto3 itself is required for runtime functionality.","package":"boto3","optional":false}],"imports":[{"note":"Type annotations for boto3 clients should be imported from the specific `mypy_boto3_*` package, not directly from `boto3`.","wrong":"from boto3.client import KinesisVideoClient","symbol":"KinesisVideoClient","correct":"from mypy_boto3_kinesisvideo.client import KinesisVideoClient"},{"note":"Type definitions for service responses are found in the `type_defs` module.","symbol":"DescribeStreamOutputTypeDef","correct":"from mypy_boto3_kinesisvideo.type_defs import DescribeStreamOutputTypeDef"}],"quickstart":{"code":"import boto3\nfrom typing import TYPE_CHECKING\n\nif TYPE_CHECKING:\n    from mypy_boto3_kinesisvideo.client import KinesisVideoClient\n    from mypy_boto3_kinesisvideo.type_defs import ListStreamsOutputTypeDef\n\ndef get_kinesisvideo_client() -> 'KinesisVideoClient':\n    # In a real application, credentials and region would be configured\n    # via environment variables, ~/.aws/credentials, or other boto3 methods.\n    # Using os.environ.get for example runnable code.\n    session = boto3.Session(\n        aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID', 'test'),\n        aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY', 'test'),\n        region_name=os.environ.get('AWS_DEFAULT_REGION', 'us-east-1')\n    )\n    client: KinesisVideoClient = session.client(\"kinesisvideo\")\n    return client\n\ndef list_kinesis_streams():\n    client = get_kinesisvideo_client()\n    response: ListStreamsOutputTypeDef = client.list_streams()\n    print(\"Kinesis Video Streams:\")\n    for stream_info in response.get('StreamInfoList', []):\n        print(f\"  - {stream_info.get('StreamName')} (ARN: {stream_info.get('StreamARN')})\")\n\n# Example usage:\nif __name__ == '__main__':\n    import os\n    # Set dummy AWS credentials for local execution if not already set\n    # For actual AWS interaction, ensure valid credentials are configured.\n    os.environ.setdefault('AWS_ACCESS_KEY_ID', 'AKIAIOSFODNN7EXAMPLE')\n    os.environ.setdefault('AWS_SECRET_ACCESS_KEY', 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY')\n    os.environ.setdefault('AWS_DEFAULT_REGION', 'us-east-1')\n    \n    try:\n        list_kinesis_streams()\n    except Exception as e:\n        print(f\"An error occurred: {e}\")\n        print(\"Please ensure AWS credentials are correctly configured if you expect real data.\")","lang":"python","description":"This quickstart demonstrates how to obtain a type-hinted KinesisVideo client using `boto3` and perform a `list_streams` operation. The `TYPE_CHECKING` block ensures that `mypy_boto3_kinesisvideo` is only imported during type checking, avoiding a runtime dependency if not strictly needed in production code."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or newer.","message":"Support for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0. Users on Python 3.8 will need to upgrade their Python version to 3.9 or higher to use recent versions of this library.","severity":"breaking","affected_versions":">=8.12.0 of mypy-boto3-builder (corresponds to mypy-boto3-kinesisvideo 1.42.3 and later)"},{"fix":"Ensure your build system is compatible with PEP 561 package layouts. Standard pip installations should handle this automatically.","message":"The library migrated to PEP 561 compatible packages in `mypy-boto3-builder` version 8.12.0. This might affect custom build systems or environments that expect the older package structure.","severity":"breaking","affected_versions":">=8.12.0 of mypy-boto3-builder (corresponds to mypy-boto3-kinesisvideo 1.42.3 and later)"},{"fix":"Review your code for any custom TypeDef imports or usage patterns, especially for services with complex request/response types, and adjust to the new naming conventions if necessary.","message":"TypeDef naming conventions were changed in `mypy-boto3-builder` 8.9.0. Specifically, packed method arguments' TypeDefs use shorter names, and conflicting `Extra` postfixes were moved to the end. While this might not directly impact `KinesisVideo` specifically, it is a general change in the builder that could affect other services used alongside `KinesisVideo`.","severity":"breaking","affected_versions":">=8.9.0 of mypy-boto3-builder"},{"fix":"Ensure you have `pip install boto3` in your project's dependencies alongside `mypy-boto3-kinesisvideo`.","message":"This package provides type annotations only. For the actual runtime functionality, the `boto3` library must also be installed in your environment.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always explicitly type hint your boto3 client objects, e.g., `client: KinesisVideoClient = session.client(\"kinesisvideo\")`.","message":"For optimal type checking and IDE auto-completion, especially for `boto3.client` and `boto3.session.client` calls, explicit type annotations are highly recommended.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Implement the `if TYPE_CHECKING: ... else: ... = object` pattern for types imported from `mypy-boto3-*` packages, as shown in the quickstart example.","message":"Pylint might report undefined variables when using `TYPE_CHECKING` for conditional imports. To avoid this, set all types to `object` in the non-`TYPE_CHECKING` branch.","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"}