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-aiobotocore[databrew]
package installed.
Write your GlueDataBrew
code as usual,
type checking and code completion should work out of the box.
# GlueDataBrewClient usage example
from aiobotocore.session import get_session
session = get_session()
async with session.create_client("databrew") as client: # (1)
result = await client.batch_delete_recipe_version() # (2)
- client: GlueDataBrewClient
- result: BatchDeleteRecipeVersionResponseTypeDef
# ListDatasetsPaginator usage example
from aiobotocore.session import get_session
session = get_session()
async with session.create_client("databrew") as client: # (1)
paginator = client.get_paginator("list_datasets") # (2)
async for item in paginator.paginate(...):
print(item) # (3)
- client: GlueDataBrewClient
- paginator: ListDatasetsPaginator
- item: ListDatasetsResponseTypeDef
Explicit type annotations#
With types-aiobotocore-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 aiobotocore.session import get_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 = get_session()
async with session.create_client("databrew") as client:
client: GlueDataBrewClient
kwargs: BatchDeleteRecipeVersionRequestRequestTypeDef = {...}
result: BatchDeleteRecipeVersionResponseTypeDef = await client.batch_delete_recipe_version(**kwargs)
# ListDatasetsPaginator usage example with type annotations
from aiobotocore.session import get_session
from types_aiobotocore_databrew.client import GlueDataBrewClient
from types_aiobotocore_databrew.paginator import ListDatasetsPaginator
from types_aiobotocore_databrew.type_defs import ListDatasetsResponseTypeDef
session = get_session()
async with session.create_client("databrew") as client:
client: GlueDataBrewClient
paginator: ListDatasetsPaginator = client.get_paginator("list_datasets")
async for item in paginator.paginate(...):
item: ListDatasetsResponseTypeDef
print(item)