Skip to content

Examples#

Index > MarketplaceCommerceAnalytics > Examples

Auto-generated documentation for MarketplaceCommerceAnalytics type annotations stubs module types-aiobotocore-marketplacecommerceanalytics.

Client#

Implicit type annotations#

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

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

# MarketplaceCommerceAnalyticsClient usage example

from aioboto3.session import Session


session = Session()

async with session.client("marketplacecommerceanalytics") as client:  # (1)
    result = await client.generate_data_set()  # (2)
  1. client: MarketplaceCommerceAnalyticsClient
  2. result: GenerateDataSetResultTypeDef

Explicit type annotations#

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

# MarketplaceCommerceAnalyticsClient usage example with type annotations

from aioboto3.session import Session

from types_aiobotocore_marketplacecommerceanalytics.client import MarketplaceCommerceAnalyticsClient
from types_aiobotocore_marketplacecommerceanalytics.type_defs import GenerateDataSetResultTypeDef
from types_aiobotocore_marketplacecommerceanalytics.type_defs import GenerateDataSetRequestRequestTypeDef


session = Session()

client: MarketplaceCommerceAnalyticsClient
async with session.client("marketplacecommerceanalytics") as client:  # (1)
    kwargs: GenerateDataSetRequestRequestTypeDef = {...}  # (2)
    result: GenerateDataSetResultTypeDef = await client.generate_data_set(**kwargs)  # (3)
  1. client: MarketplaceCommerceAnalyticsClient
  2. kwargs: GenerateDataSetRequestRequestTypeDef
  3. result: GenerateDataSetResultTypeDef