Examples#
Index > NovaActService > Examples
Auto-generated documentation for NovaActService type annotations stubs module mypy-boto3-nova-act.
Client#
Implicit type annotations#
Can be used with boto3-stubs[nova-act] package installed.
Write your NovaActService code as usual,
type checking and code completion should work out of the box.
Client method usage example#
# NovaActServiceClient usage example
from boto3.session import Session
session = Session()
client = session.client("nova-act") # (1)
result = client.create_act() # (2)
- client: NovaActServiceClient
- result: CreateActResponseTypeDef
Paginator usage example#
# ListActsPaginator usage example
from boto3.session import Session
session = Session()
client = session.client("nova-act") # (1)
paginator = client.get_paginator("list_acts") # (2)
for item in paginator.paginate(...):
print(item) # (3)
- client: NovaActServiceClient
- paginator: ListActsPaginator
- item: ListActsResponseTypeDef
Explicit type annotations#
With boto3-stubs-lite[nova-act]
or a standalone mypy_boto3_nova_act package, you have to explicitly specify client: NovaActServiceClient 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#
# NovaActServiceClient usage example with type annotations
from boto3.session import Session
from mypy_boto3_nova_act.client import NovaActServiceClient
from mypy_boto3_nova_act.type_defs import CreateActResponseTypeDef
from mypy_boto3_nova_act.type_defs import CreateActRequestTypeDef
session = Session()
client: NovaActServiceClient = session.client("nova-act")
kwargs: CreateActRequestTypeDef = {...}
result: CreateActResponseTypeDef = client.create_act(**kwargs)
Paginator usage example#
# ListActsPaginator usage example with type annotations
from boto3.session import Session
from mypy_boto3_nova_act.client import NovaActServiceClient
from mypy_boto3_nova_act.paginator import ListActsPaginator
from mypy_boto3_nova_act.type_defs import ListActsResponseTypeDef
session = Session()
client: NovaActServiceClient = session.client("nova-act")
paginator: ListActsPaginator = client.get_paginator("list_acts")
for item in paginator.paginate(...):
item: ListActsResponseTypeDef
print(item)