Skip to content

Examples#

Index > ApplicationCostProfiler > Examples

Auto-generated documentation for ApplicationCostProfiler type annotations stubs module types-aiobotocore-applicationcostprofiler.

Client#

Implicit type annotations#

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

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

# ApplicationCostProfilerClient usage example

from aiobotocore.session import get_session


session = get_session()

async with session.create_client("applicationcostprofiler") as client:  # (1)
    result = await client.delete_report_definition()  # (2)
  1. client: ApplicationCostProfilerClient
  2. result: DeleteReportDefinitionResultTypeDef
# ListReportDefinitionsPaginator usage example

from aiobotocore.session import get_session


session = get_session()

async with session.create_client("applicationcostprofiler") as client:  # (1)
    paginator = client.get_paginator("list_report_definitions")  # (2)
    async for item in paginator.paginate(...):
        print(item)  # (3)
  1. client: ApplicationCostProfilerClient
  2. paginator: ListReportDefinitionsPaginator
  3. item: ListReportDefinitionsResultTypeDef

Explicit type annotations#

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

# ApplicationCostProfilerClient usage example with type annotations

from aiobotocore.session import get_session

from types_aiobotocore_applicationcostprofiler.client import ApplicationCostProfilerClient
from types_aiobotocore_applicationcostprofiler.type_defs import DeleteReportDefinitionResultTypeDef
from types_aiobotocore_applicationcostprofiler.type_defs import DeleteReportDefinitionRequestRequestTypeDef


session = get_session()

async with session.create_client("applicationcostprofiler") as client:
    client: ApplicationCostProfilerClient
    kwargs: DeleteReportDefinitionRequestRequestTypeDef = {...}
    result: DeleteReportDefinitionResultTypeDef = await client.delete_report_definition(**kwargs)
# ListReportDefinitionsPaginator usage example with type annotations

from aiobotocore.session import get_session

from types_aiobotocore_applicationcostprofiler.client import ApplicationCostProfilerClient
from types_aiobotocore_applicationcostprofiler.paginator import ListReportDefinitionsPaginator
from types_aiobotocore_applicationcostprofiler.type_defs import ListReportDefinitionsResultTypeDef


session = get_session()

async with session.create_client("applicationcostprofiler") as client:
    client: ApplicationCostProfilerClient
    paginator: ListReportDefinitionsPaginator = client.get_paginator("list_report_definitions")
    async for item in paginator.paginate(...):
        item: ListReportDefinitionsResultTypeDef
        print(item)