Skip to content

Examples#

Index > MarketplaceMetering > Examples

Auto-generated documentation for MarketplaceMetering type annotations stubs module types-aiobotocore-meteringmarketplace.

Client#

Implicit type annotations#

Can be used with types-aiobotocore[meteringmarketplace] package installed.

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

# MarketplaceMeteringClient usage example

from aiobotocore.session import get_session


session = get_session()

async with session.create_client("meteringmarketplace") as client:  # (1)
    result = await client.batch_meter_usage()  # (2)
  1. client: MarketplaceMeteringClient
  2. result: BatchMeterUsageResultTypeDef

Explicit type annotations#

With types-aiobotocore-lite[meteringmarketplace] or a standalone types_aiobotocore_meteringmarketplace package, you have to explicitly specify client: MarketplaceMeteringClient 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.

# MarketplaceMeteringClient usage example with type annotations

from aiobotocore.session import get_session

from types_aiobotocore_meteringmarketplace.client import MarketplaceMeteringClient
from types_aiobotocore_meteringmarketplace.type_defs import BatchMeterUsageResultTypeDef
from types_aiobotocore_meteringmarketplace.type_defs import BatchMeterUsageRequestRequestTypeDef


session = get_session()

async with session.create_client("meteringmarketplace") as client:
    client: MarketplaceMeteringClient
    kwargs: BatchMeterUsageRequestRequestTypeDef = {...}
    result: BatchMeterUsageResultTypeDef = await client.batch_meter_usage(**kwargs)