Examples#
Auto-generated documentation for IVS type annotations stubs module types-aiobotocore-ivs.
Client#
Implicit type annotations#
Can be used with types-aioboto3[ivs]
package installed.
Write your IVS
code as usual,
type checking and code completion should work out of the box.
# IVSClient usage example
from aioboto3.session import Session
session = Session()
async with session.client("ivs") as client: # (1)
result = await client.batch_get_channel() # (2)
- client: IVSClient
- result: BatchGetChannelResponseTypeDef
# ListChannelsPaginator usage example
from aioboto3.session import Session
session = Session()
async with session.client("ivs") as client: # (1)
paginator = client.get_paginator("list_channels") # (2)
async for item in paginator.paginate(...):
print(item) # (3)
- client: IVSClient
- paginator: ListChannelsPaginator
- item: ListChannelsResponseTypeDef
Explicit type annotations#
With types-aioboto3-lite[ivs]
or a standalone types_aiobotocore_ivs
package, you have to explicitly specify
client: IVSClient
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.
# IVSClient usage example with type annotations
from aioboto3.session import Session
from types_aiobotocore_ivs.client import IVSClient
from types_aiobotocore_ivs.type_defs import BatchGetChannelResponseTypeDef
from types_aiobotocore_ivs.type_defs import BatchGetChannelRequestRequestTypeDef
session = Session()
client: IVSClient
async with session.client("ivs") as client: # (1)
kwargs: BatchGetChannelRequestRequestTypeDef = {...} # (2)
result: BatchGetChannelResponseTypeDef = await client.batch_get_channel(**kwargs) # (3)
- client: IVSClient
- kwargs: BatchGetChannelRequestRequestTypeDef
- result: BatchGetChannelResponseTypeDef
# ListChannelsPaginator usage example with type annotations
from aioboto3.session import Session
from types_aiobotocore_ivs.client import IVSClient
from types_aiobotocore_ivs.paginator import ListChannelsPaginator
from types_aiobotocore_ivs.type_defs import ListChannelsResponseTypeDef
session = Session()
client: IVSClient
async with session.client("ivs") as client: # (1)
paginator: ListChannelsPaginator = client.get_paginator("list_channels") # (2)
async for item in paginator.paginate(...):
item: ListChannelsResponseTypeDef
print(item) # (3)
- client: IVSClient
- paginator: ListChannelsPaginator
- item: ListChannelsResponseTypeDef