Examples#
Index > GameLiftStreams > Examples
Auto-generated documentation for GameLiftStreams type annotations stubs module types-boto3-gameliftstreams.
Client#
Implicit type annotations#
Can be used with types-boto3[gameliftstreams]
package installed.
Write your GameLiftStreams
code as usual,
type checking and code completion should work out of the box.
Client method usage example#
# GameLiftStreamsClient usage example
from boto3.session import Session
session = Session()
client = session.client("gameliftstreams") # (1)
result = client.add_stream_group_locations() # (2)
- client: GameLiftStreamsClient
- result: AddStreamGroupLocationsOutputTypeDef
Paginator usage example#
# ListApplicationsPaginator usage example
from boto3.session import Session
session = Session()
client = session.client("gameliftstreams") # (1)
paginator = client.get_paginator("list_applications") # (2)
for item in paginator.paginate(...):
print(item) # (3)
- client: GameLiftStreamsClient
- paginator: ListApplicationsPaginator
- item: ListApplicationsOutputTypeDef
Waiter usage example#
# ApplicationDeletedWaiter usage example
from boto3.session import Session
session = Session()
client = session.client("gameliftstreams") # (1)
waiter = client.get_waiter("application_deleted") # (2)
waiter.wait(...)
- client: GameLiftStreamsClient
- waiter: ApplicationDeletedWaiter
Explicit type annotations#
With types-boto3-lite[gameliftstreams]
or a standalone types_boto3_gameliftstreams
package, you have to explicitly specify client: GameLiftStreamsClient
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.
Client method usage example#
# GameLiftStreamsClient usage example with type annotations
from boto3.session import Session
from types_boto3_gameliftstreams.client import GameLiftStreamsClient
from types_boto3_gameliftstreams.type_defs import AddStreamGroupLocationsOutputTypeDef
from types_boto3_gameliftstreams.type_defs import AddStreamGroupLocationsInputTypeDef
session = Session()
client: GameLiftStreamsClient = session.client("gameliftstreams")
kwargs: AddStreamGroupLocationsInputTypeDef = {...}
result: AddStreamGroupLocationsOutputTypeDef = client.add_stream_group_locations(**kwargs)
Paginator usage example#
# ListApplicationsPaginator usage example with type annotations
from boto3.session import Session
from types_boto3_gameliftstreams.client import GameLiftStreamsClient
from types_boto3_gameliftstreams.paginator import ListApplicationsPaginator
from types_boto3_gameliftstreams.type_defs import ListApplicationsOutputTypeDef
session = Session()
client: GameLiftStreamsClient = session.client("gameliftstreams")
paginator: ListApplicationsPaginator = client.get_paginator("list_applications")
for item in paginator.paginate(...):
item: ListApplicationsOutputTypeDef
print(item)
Waiter usage example#
# ApplicationDeletedWaiter usage example with type annotations
from boto3.session import Session
from types_boto3_gameliftstreams.client import GameLiftStreamsClient
from types_boto3_gameliftstreams.waiter import ApplicationDeletedWaiter
session = Session()
client: GameLiftStreamsClient = session.client("gameliftstreams")
waiter: ApplicationDeletedWaiter = client.get_waiter("application_deleted")
waiter.wait(...)