Skip to content

Examples#

Index > Ivsrealtime > Examples

Auto-generated documentation for Ivsrealtime type annotations stubs module mypy-boto3-ivs-realtime.

Client#

Implicit type annotations#

Can be used with boto3-stubs[ivs-realtime] package installed.

Write your Ivsrealtime code as usual, type checking and code completion should work out of the box.

# IvsrealtimeClient usage example

from boto3.session import Session


session = Session()

client = session.client("ivs-realtime")  # (1)
result = client.create_encoder_configuration()  # (2)
  1. client: IvsrealtimeClient
  2. result: CreateEncoderConfigurationResponseTypeDef

Explicit type annotations#

With boto3-stubs-lite[ivs-realtime] or a standalone mypy_boto3_ivs_realtime package, you have to explicitly specify client: IvsrealtimeClient type annotation.

All other type annotations are optional, as types should be discovered automatically. However, these type annotations can be helpful in your functions and methods.

# IvsrealtimeClient usage example with type annotations

from boto3.session import Session

from mypy_boto3_ivs_realtime.client import IvsrealtimeClient
from mypy_boto3_ivs_realtime.type_defs import CreateEncoderConfigurationResponseTypeDef
from mypy_boto3_ivs_realtime.type_defs import CreateEncoderConfigurationRequestRequestTypeDef


session = Session()

client: IvsrealtimeClient = session.client("ivs-realtime")

kwargs: CreateEncoderConfigurationRequestRequestTypeDef = {...}
result: CreateEncoderConfigurationResponseTypeDef = client.create_encoder_configuration(**kwargs)