Skip to content

Examples#

Index > LaunchWizard > Examples

Auto-generated documentation for LaunchWizard type annotations stubs module types-aiobotocore-launch-wizard.

Client#

Implicit type annotations#

Can be used with types-aioboto3[launch-wizard] package installed.

Write your LaunchWizard code as usual, type checking and code completion should work out of the box.

# LaunchWizardClient usage example

from aioboto3.session import Session


session = Session()

async with session.client("launch-wizard") as client:  # (1)
    result = await client.create_deployment()  # (2)
  1. client: LaunchWizardClient
  2. result: CreateDeploymentOutputTypeDef
# ListDeploymentEventsPaginator usage example

from aioboto3.session import Session


session = Session()

async with session.client("launch-wizard") as client:  # (1)
    paginator = client.get_paginator("list_deployment_events")  # (2)
    async for item in paginator.paginate(...):
        print(item)  # (3)
  1. client: LaunchWizardClient
  2. paginator: ListDeploymentEventsPaginator
  3. item: ListDeploymentEventsOutputTypeDef

Explicit type annotations#

With types-aioboto3-lite[launch-wizard] or a standalone types_aiobotocore_launch_wizard package, you have to explicitly specify client: LaunchWizardClient 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.

# LaunchWizardClient usage example with type annotations

from aioboto3.session import Session

from types_aiobotocore_launch_wizard.client import LaunchWizardClient
from types_aiobotocore_launch_wizard.type_defs import CreateDeploymentOutputTypeDef
from types_aiobotocore_launch_wizard.type_defs import CreateDeploymentInputRequestTypeDef


session = Session()

client: LaunchWizardClient
async with session.client("launch-wizard") as client:  # (1)
    kwargs: CreateDeploymentInputRequestTypeDef = {...}  # (2)
    result: CreateDeploymentOutputTypeDef = await client.create_deployment(**kwargs)  # (3)
  1. client: LaunchWizardClient
  2. kwargs: CreateDeploymentInputRequestTypeDef
  3. result: CreateDeploymentOutputTypeDef
# ListDeploymentEventsPaginator usage example with type annotations

from aioboto3.session import Session

from types_aiobotocore_launch_wizard.client import LaunchWizardClient
from types_aiobotocore_launch_wizard.paginator import ListDeploymentEventsPaginator
from types_aiobotocore_launch_wizard.type_defs import ListDeploymentEventsOutputTypeDef


session = Session()

client: LaunchWizardClient
async with session.client("launch-wizard") as client:  # (1)
    paginator: ListDeploymentEventsPaginator = client.get_paginator("list_deployment_events")  # (2)
    async for item in paginator.paginate(...):
        item: ListDeploymentEventsOutputTypeDef
        print(item)  # (3)
  1. client: LaunchWizardClient
  2. paginator: ListDeploymentEventsPaginator
  3. item: ListDeploymentEventsOutputTypeDef