Skip to content

Examples#

Index > Ivsrealtime > Examples

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

Client#

Implicit type annotations#

Can be used with types-boto3[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
# ListIngestConfigurationsPaginator usage example

from boto3.session import Session


session = Session()
client = session.client("ivs-realtime")  # (1)

paginator = client.get_paginator("list_ingest_configurations")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
  1. client: IvsrealtimeClient
  2. paginator: ListIngestConfigurationsPaginator
  3. item: ListIngestConfigurationsResponseTypeDef

Explicit type annotations#

With types-boto3-lite[ivs-realtime] or a standalone types_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 types_boto3_ivs_realtime.client import IvsrealtimeClient
from types_boto3_ivs_realtime.type_defs import CreateEncoderConfigurationResponseTypeDef
from types_boto3_ivs_realtime.type_defs import CreateEncoderConfigurationRequestRequestTypeDef


session = Session()

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

kwargs: CreateEncoderConfigurationRequestRequestTypeDef = {...}
result: CreateEncoderConfigurationResponseTypeDef = client.create_encoder_configuration(**kwargs)
# ListIngestConfigurationsPaginator usage example with type annotations

from boto3.session import Session

from types_boto3_ivs_realtime.client import IvsrealtimeClient
from types_boto3_ivs_realtime.paginator import ListIngestConfigurationsPaginator
from types_boto3_ivs_realtime.type_defs import ListIngestConfigurationsResponseTypeDef


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

paginator: ListIngestConfigurationsPaginator = client.get_paginator("list_ingest_configurations")
for item in paginator.paginate(...):
    item: ListIngestConfigurationsResponseTypeDef
    print(item)