Examples
Index > MigrationHubRefactorSpaces > Examples
Auto-generated documentation for MigrationHubRefactorSpaces type annotations stubs module types-aiobotocore-migration-hub-refactor-spaces.
Client
Implicit type annotations
Can be used with types-aioboto3[migration-hub-refactor-spaces]
package installed.
Write your MigrationHubRefactorSpaces
code as usual,
type checking and code completion should work out of the box.
from aioboto3.session import Session
session = Session()
async with session.client("migration-hub-refactor-spaces") as client: # (1)
result = await client.create_application() # (2)
- client: MigrationHubRefactorSpacesClient
- result: CreateApplicationResponseTypeDef
from aioboto3.session import Session
session = Session()
async with session.client("migration-hub-refactor-spaces") as client: # (1)
paginator = client.get_paginator("list_applications") # (2)
async for item in paginator.paginate(...):
print(item) # (3)
- client: MigrationHubRefactorSpacesClient
- paginator: ListApplicationsPaginator
- item: ListApplicationsResponseTypeDef
Explicit type annotations
With types-aioboto3-lite[migration-hub-refactor-spaces]
or a standalone types_aiobotocore_migration_hub_refactor_spaces
package, you have to explicitly specify
client: MigrationHubRefactorSpacesClient
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.
from aioboto3.session import Session
from types_aiobotocore_migration_hub_refactor_spaces.client import MigrationHubRefactorSpacesClient
from types_aiobotocore_migration_hub_refactor_spaces.type_defs import CreateApplicationResponseTypeDef
from types_aiobotocore_migration_hub_refactor_spaces.type_defs import CreateApplicationRequestRequestTypeDef
session = Session()
client: MigrationHubRefactorSpacesClient
async with session.client("migration-hub-refactor-spaces") as client: # (1)
kwargs: CreateApplicationRequestRequestTypeDef = {...} # (2)
result: CreateApplicationResponseTypeDef = await client.create_application(**kwargs) # (3)
- client: MigrationHubRefactorSpacesClient
- kwargs: CreateApplicationRequestRequestTypeDef
- result: CreateApplicationResponseTypeDef
from aioboto3.session import Session
from types_aiobotocore_migration_hub_refactor_spaces.client import MigrationHubRefactorSpacesClient
from types_aiobotocore_migration_hub_refactor_spaces.paginator import ListApplicationsPaginator
from types_aiobotocore_migration_hub_refactor_spaces.type_defs import ListApplicationsResponseTypeDef
session = Session()
client: MigrationHubRefactorSpacesClient
async with session.client("migration-hub-refactor-spaces") as client: # (1)
paginator: ListApplicationsPaginator = client.get_paginator("list_applications") # (2)
async for item in paginator.paginate(...):
item: ListApplicationsResponseTypeDef
print(item) # (3)
- client: MigrationHubRefactorSpacesClient
- paginator: ListApplicationsPaginator
- item: ListApplicationsResponseTypeDef