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-aioboto3[meteringmarketplace]
package installed.
Write your MarketplaceMetering
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("meteringmarketplace") as client: # (1)
result = await client.batch_meter_usage() # (2)
- client: MarketplaceMeteringClient
- result: BatchMeterUsageResultTypeDef
Explicit type annotations
With types-aioboto3-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.
Client usage example
from aioboto3.session import 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 = Session()
client: MarketplaceMeteringClient
async with session.client("meteringmarketplace") as client: # (1)
kwargs: BatchMeterUsageRequestRequestTypeDef = {...} # (2)
result: BatchMeterUsageResultTypeDef = await client.batch_meter_usage(**kwargs) # (3)
- client: MarketplaceMeteringClient
- kwargs: BatchMeterUsageRequestRequestTypeDef
- result: BatchMeterUsageResultTypeDef