Skip to content

Examples

Index > RoboMaker > Examples

Auto-generated documentation for RoboMaker type annotations stubs module types-aiobotocore-robomaker.

Client

Implicit type annotations

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

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

Client usage example
from aioboto3.session import Session


session = Session()

async with session.client("robomaker") as client:  # (1)
    result = await client.batch_delete_worlds()  # (2)
  1. client: RoboMakerClient
  2. result: BatchDeleteWorldsResponseTypeDef
Paginator usage example
from aioboto3.session import Session


session = Session()

async with session.client("robomaker") as client:  # (1)
    paginator = client.get_paginator("list_deployment_jobs")  # (2)
    async for item in paginator.paginate(...):
        print(item)  # (3)
  1. client: RoboMakerClient
  2. paginator: ListDeploymentJobsPaginator
  3. item: ListDeploymentJobsResponseTypeDef

Explicit type annotations

With types-aioboto3-lite[robomaker] or a standalone types_aiobotocore_robomaker package, you have to explicitly specify client: RoboMakerClient 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 usage example
from aioboto3.session import Session

from types_aiobotocore_robomaker.client import RoboMakerClient
from types_aiobotocore_robomaker.type_defs import BatchDeleteWorldsResponseTypeDef
from types_aiobotocore_robomaker.type_defs import BatchDeleteWorldsRequestRequestTypeDef


session = Session()

client: RoboMakerClient
async with session.client("robomaker") as client:  # (1)
    kwargs: BatchDeleteWorldsRequestRequestTypeDef = {...}  # (2)
    result: BatchDeleteWorldsResponseTypeDef = await client.batch_delete_worlds(**kwargs)  # (3)
  1. client: RoboMakerClient
  2. kwargs: BatchDeleteWorldsRequestRequestTypeDef
  3. result: BatchDeleteWorldsResponseTypeDef
Paginator usage example
from aioboto3.session import Session

from types_aiobotocore_robomaker.client import RoboMakerClient
from types_aiobotocore_robomaker.paginator import ListDeploymentJobsPaginator
from types_aiobotocore_robomaker.type_defs import ListDeploymentJobsResponseTypeDef


session = Session()

client: RoboMakerClient
async with session.client("robomaker") as client:  # (1)
    paginator: ListDeploymentJobsPaginator = client.get_paginator("list_deployment_jobs")  # (2)
    async for item in paginator.paginate(...):
        item: ListDeploymentJobsResponseTypeDef
        print(item)  # (3)
  1. client: RoboMakerClient
  2. paginator: ListDeploymentJobsPaginator
  3. item: ListDeploymentJobsResponseTypeDef