Skip to content

Examples#

Index > GlueDataBrew > Examples

Auto-generated documentation for GlueDataBrew type annotations stubs module types-aiobotocore-databrew.

Client#

Implicit type annotations#

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

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

# GlueDataBrewClient usage example

from aioboto3.session import Session


session = Session()

async with session.client("databrew") as client:  # (1)
    result = await client.batch_delete_recipe_version()  # (2)
  1. client: GlueDataBrewClient
  2. result: BatchDeleteRecipeVersionResponseTypeDef
# ListDatasetsPaginator usage example

from aioboto3.session import Session


session = Session()

async with session.client("databrew") as client:  # (1)
    paginator = client.get_paginator("list_datasets")  # (2)
    async for item in paginator.paginate(...):
        print(item)  # (3)
  1. client: GlueDataBrewClient
  2. paginator: ListDatasetsPaginator
  3. item: ListDatasetsResponsePaginatorTypeDef

Explicit type annotations#

With types-aioboto3-lite[databrew] or a standalone types_aiobotocore_databrew package, you have to explicitly specify client: GlueDataBrewClient 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.

# GlueDataBrewClient usage example with type annotations

from aioboto3.session import Session

from types_aiobotocore_databrew.client import GlueDataBrewClient
from types_aiobotocore_databrew.type_defs import BatchDeleteRecipeVersionResponseTypeDef
from types_aiobotocore_databrew.type_defs import BatchDeleteRecipeVersionRequestRequestTypeDef


session = Session()

client: GlueDataBrewClient
async with session.client("databrew") as client:  # (1)
    kwargs: BatchDeleteRecipeVersionRequestRequestTypeDef = {...}  # (2)
    result: BatchDeleteRecipeVersionResponseTypeDef = await client.batch_delete_recipe_version(**kwargs)  # (3)
  1. client: GlueDataBrewClient
  2. kwargs: BatchDeleteRecipeVersionRequestRequestTypeDef
  3. result: BatchDeleteRecipeVersionResponseTypeDef
# ListDatasetsPaginator usage example with type annotations

from aioboto3.session import Session

from types_aiobotocore_databrew.client import GlueDataBrewClient
from types_aiobotocore_databrew.paginator import ListDatasetsPaginator
from types_aiobotocore_databrew.type_defs import ListDatasetsResponsePaginatorTypeDef


session = Session()

client: GlueDataBrewClient
async with session.client("databrew") as client:  # (1)
    paginator: ListDatasetsPaginator = client.get_paginator("list_datasets")  # (2)
    async for item in paginator.paginate(...):
        item: ListDatasetsResponsePaginatorTypeDef
        print(item)  # (3)
  1. client: GlueDataBrewClient
  2. paginator: ListDatasetsPaginator
  3. item: ListDatasetsResponsePaginatorTypeDef