Examples#
Index > ManagedBlockchainQuery > Examples
Auto-generated documentation for ManagedBlockchainQuery type annotations stubs module types-aiobotocore-managedblockchain-query.
Client#
Implicit type annotations#
Can be used with types-aiobotocore[managedblockchain-query]
package installed.
Write your ManagedBlockchainQuery
code as usual,
type checking and code completion should work out of the box.
# ManagedBlockchainQueryClient usage example
from aiobotocore.session import get_session
session = get_session()
async with session.create_client("managedblockchain-query") as client: # (1)
result = await client.batch_get_token_balance() # (2)
- client: ManagedBlockchainQueryClient
- result: BatchGetTokenBalanceOutputTypeDef
# ListTokenBalancesPaginator usage example
from aiobotocore.session import get_session
session = get_session()
async with session.create_client("managedblockchain-query") as client: # (1)
paginator = client.get_paginator("list_token_balances") # (2)
async for item in paginator.paginate(...):
print(item) # (3)
- client: ManagedBlockchainQueryClient
- paginator: ListTokenBalancesPaginator
- item: ListTokenBalancesOutputTypeDef
Explicit type annotations#
With types-aiobotocore-lite[managedblockchain-query]
or a standalone types_aiobotocore_managedblockchain_query
package, you have to explicitly specify
client: ManagedBlockchainQueryClient
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.
# ManagedBlockchainQueryClient usage example with type annotations
from aiobotocore.session import get_session
from types_aiobotocore_managedblockchain_query.client import ManagedBlockchainQueryClient
from types_aiobotocore_managedblockchain_query.type_defs import BatchGetTokenBalanceOutputTypeDef
from types_aiobotocore_managedblockchain_query.type_defs import BatchGetTokenBalanceInputRequestTypeDef
session = get_session()
async with session.create_client("managedblockchain-query") as client:
client: ManagedBlockchainQueryClient
kwargs: BatchGetTokenBalanceInputRequestTypeDef = {...}
result: BatchGetTokenBalanceOutputTypeDef = await client.batch_get_token_balance(**kwargs)
# ListTokenBalancesPaginator usage example with type annotations
from aiobotocore.session import get_session
from types_aiobotocore_managedblockchain_query.client import ManagedBlockchainQueryClient
from types_aiobotocore_managedblockchain_query.paginator import ListTokenBalancesPaginator
from types_aiobotocore_managedblockchain_query.type_defs import ListTokenBalancesOutputTypeDef
session = get_session()
async with session.create_client("managedblockchain-query") as client:
client: ManagedBlockchainQueryClient
paginator: ListTokenBalancesPaginator = client.get_paginator("list_token_balances")
async for item in paginator.paginate(...):
item: ListTokenBalancesOutputTypeDef
print(item)