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