mypy-boto3-kinesis-video-signaling Type Stubs
This library provides type annotations for the `boto3` Kinesis Video Signaling Channels service (version 1.42.3). It is generated by `mypy-boto3-builder` (version 8.12.0) and offers type checking compatibility with tools like mypy, Pyright, VSCode, and PyCharm. The project maintains frequent updates, often in sync with `boto3` and `botocore` releases, ensuring up-to-date type hints for AWS SDK usage.
Warnings
- breaking Python 3.8 support was removed starting with `mypy-boto3-builder` version 8.12.0 (which generates these stubs). Users on Python 3.8 must upgrade to Python 3.9+ or pin an older `mypy-boto3` version.
- breaking Breaking changes to `TypeDef` naming conventions were introduced in `mypy-boto3-builder` version 8.9.0. For example, `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`. Code directly referencing these generated TypeDefs will need to be updated.
- gotcha These are type stubs only; `boto3` itself must be installed for your code to run at runtime. Forgetting to install `boto3` will result in runtime `ModuleNotFoundError` or similar issues.
- gotcha For optimal type checking, the version of `mypy-boto3-kinesis-video-signaling` should ideally match the version of your installed `boto3` library. Mismatched versions may lead to incorrect or missing type hints.
- gotcha While `mypy-boto3` aims for auto-discovery of types for `boto3.client` and `boto3.resource` calls, some IDEs (especially older versions of VSCode/PyCharm) or specific complex scenarios might benefit from explicit type annotations for full auto-completion and type checking benefits.
Install
-
pip install boto3 mypy-boto3-kinesis-video-signaling
Imports
- KinesisVideoSignalingChannelsClient
from mypy_boto3_kinesis_video_signaling.client import KinesisVideoSignalingChannelsClient
- CreateSignalingChannelOutputTypeDef
from mypy_boto3_kinesis_video_signaling.type_defs import CreateSignalingChannelOutputTypeDef
Quickstart
import boto3
from mypy_boto3_kinesis_video_signaling.client import KinesisVideoSignalingChannelsClient
from mypy_boto3_kinesis_video_signaling.type_defs import GetIceServerConfigResponseTypeDef
def get_ice_server_config(channel_arn: str) -> GetIceServerConfigResponseTypeDef:
# boto3_session = boto3.Session(region_name="us-west-2",
# aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID', ''),
# aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY', ''))
# client: KinesisVideoSignalingChannelsClient = boto3_session.client(
# "kinesis-video-signaling"
# )
# For a quickstart without explicit session configuration for brevity:
client: KinesisVideoSignalingChannelsClient = boto3.client("kinesis-video-signaling")
response: GetIceServerConfigResponseTypeDef = client.get_ice_server_config(
ChannelARN=channel_arn
)
return response
# Example usage (will fail without a real AWS environment):
# try:
# # Replace with a valid Kinesis Video Signaling Channel ARN
# channel_arn = "arn:aws:kinesisvideo:us-west-2:123456789012:channel/my-signaling-channel/1234567890123"
# config = get_ice_server_config(channel_arn)
# print(f"ICE Server Config: {config}")
# except Exception as e:
# print(f"Error: {e}")