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)