Skip to content

Examples#

Index > MarketplaceCatalog > Examples

Auto-generated documentation for MarketplaceCatalog type annotations stubs module types-aiobotocore-marketplace-catalog.

Client#

Implicit type annotations#

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

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

# MarketplaceCatalogClient usage example

from aiobotocore.session import get_session


session = get_session()

async with session.create_client("marketplace-catalog") as client:  # (1)
    result = await client.cancel_change_set()  # (2)
  1. client: MarketplaceCatalogClient
  2. result: CancelChangeSetResponseTypeDef
# ListChangeSetsPaginator usage example

from aiobotocore.session import get_session


session = get_session()

async with session.create_client("marketplace-catalog") as client:  # (1)
    paginator = client.get_paginator("list_change_sets")  # (2)
    async for item in paginator.paginate(...):
        print(item)  # (3)
  1. client: MarketplaceCatalogClient
  2. paginator: ListChangeSetsPaginator
  3. item: ListChangeSetsResponseTypeDef

Explicit type annotations#

With types-aiobotocore-lite[marketplace-catalog] or a standalone types_aiobotocore_marketplace_catalog package, you have to explicitly specify client: MarketplaceCatalogClient 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.

# MarketplaceCatalogClient usage example with type annotations

from aiobotocore.session import get_session

from types_aiobotocore_marketplace_catalog.client import MarketplaceCatalogClient
from types_aiobotocore_marketplace_catalog.type_defs import CancelChangeSetResponseTypeDef
from types_aiobotocore_marketplace_catalog.type_defs import CancelChangeSetRequestRequestTypeDef


session = get_session()

async with session.create_client("marketplace-catalog") as client:
    client: MarketplaceCatalogClient
    kwargs: CancelChangeSetRequestRequestTypeDef = {...}
    result: CancelChangeSetResponseTypeDef = await client.cancel_change_set(**kwargs)
# ListChangeSetsPaginator usage example with type annotations

from aiobotocore.session import get_session

from types_aiobotocore_marketplace_catalog.client import MarketplaceCatalogClient
from types_aiobotocore_marketplace_catalog.paginator import ListChangeSetsPaginator
from types_aiobotocore_marketplace_catalog.type_defs import ListChangeSetsResponseTypeDef


session = get_session()

async with session.create_client("marketplace-catalog") as client:
    client: MarketplaceCatalogClient
    paginator: ListChangeSetsPaginator = client.get_paginator("list_change_sets")
    async for item in paginator.paginate(...):
        item: ListChangeSetsResponseTypeDef
        print(item)