{"id":3021,"library":"mypy-boto3-applicationcostprofiler","title":"Type annotations for boto3 ApplicationCostProfiler","description":"mypy-boto3-applicationcostprofiler provides type annotations for the boto3 ApplicationCostProfiler service, generated with mypy-boto3-builder. It enhances development with type checking and autocomplete for AWS SDK for Python (boto3) clients. The library is actively maintained with frequent releases, typically in sync with boto3 and botocore updates.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["AWS","boto3","mypy","typing","stubs","cloud","applicationcostprofiler"],"install":[{"cmd":"pip install mypy-boto3-applicationcostprofiler","lang":"bash","label":"Install standalone package"},{"cmd":"pip install 'boto3-stubs[applicationcostprofiler]'","lang":"bash","label":"Install via boto3-stubs extras (recommended)"}],"dependencies":[{"reason":"Provides the underlying AWS SDK functionality that these stubs type-hint.","package":"boto3"},{"reason":"Required for static type checking; other type checkers like Pyright are also compatible.","package":"mypy","optional":true}],"imports":[{"symbol":"ApplicationCostProfilerClient","correct":"from mypy_boto3_applicationcostprofiler.client import ApplicationCostProfilerClient"},{"note":"Type definitions are typically imported from `type_defs` or `literals` submodules for explicit usage.","symbol":"ApplicationCostProfilerServiceName","correct":"from mypy_boto3_applicationcostprofiler.type_defs import ApplicationCostProfilerServiceName"}],"quickstart":{"code":"import boto3\nfrom typing import TYPE_CHECKING\n\nif TYPE_CHECKING:\n    from mypy_boto3_applicationcostprofiler.client import ApplicationCostProfilerClient\n    from mypy_boto3_applicationcostprofiler.type_defs import ListReportDefinitionsOutputTypeDef\n\ndef get_app_cost_profiler_client() -> ApplicationCostProfilerClient:\n    \"\"\"Returns a typed ApplicationCostProfiler client.\"\"\"\n    return boto3.client('applicationcostprofiler')\n\nclient = get_app_cost_profiler_client()\n\ntry:\n    # Example operation: List report definitions\n    response: ListReportDefinitionsOutputTypeDef = client.list_report_definitions()\n    print(f\"Successfully listed {len(response.get('reportDefinitions', []))} report definitions.\")\nexcept client.exceptions.ClientError as e:\n    print(f\"Error listing report definitions: {e}\")\n","lang":"python","description":"This quickstart demonstrates how to obtain a type-hinted boto3 client for the ApplicationCostProfiler service. It uses `TYPE_CHECKING` for conditional imports, ensuring the stubs are only used during type checking. A sample API call `list_report_definitions` is included to show typical usage with type safety."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or higher. Update your `mypy` version to be compatible with your Python version.","message":"Python 3.8 support has been removed since mypy-boto3-builder 8.12.0 (which generated this package). Users on Python 3.8 will experience errors as `mypy` and `typeshed` no longer support it.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0, mypy-boto3-applicationcostprofiler >= 1.42.0"},{"fix":"Ensure your packaging tools (pip, poetry, etc.) are up-to-date. In most modern setups, this change is transparent, but older or custom environments might need adjustment.","message":"The builder migrated to PEP 561 compliant packages with version 8.12.0. This might affect how some tools or legacy environments interpret the stub packages.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0, mypy-boto3-applicationcostprofiler >= 1.42.0"},{"fix":"If you explicitly import and use TypeDef objects, review your code for updated naming conventions. Consult the service-specific `type_defs.pyi` for correct names.","message":"Starting with mypy-boto3-builder 8.9.0, TypeDef names for packed method arguments became shorter (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`), and conflicting `Extra` postfixes moved to the end (e.g., `CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`).","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.9.0, mypy-boto3-applicationcostprofiler >= 1.40.0"},{"fix":"Explicitly cast the client: `client: ApplicationCostProfilerClient = boto3.client('applicationcostprofiler')`. Using the `boto3-stubs` package (rather than individual `mypy-boto3-service` packages) often improves implicit type inference.","message":"Some IDEs (like VSCode with older Python extensions) may require explicit type annotations for `boto3.client()` or `boto3.session.client()` calls to get full autocomplete and type checking, as function overloads might not be fully supported by the IDE's language server.","severity":"gotcha","affected_versions":"All"},{"fix":"Use a workaround to set types to `object` in non-`TYPE_CHECKING` mode: `if TYPE_CHECKING: from mypy_boto3_applicationcostprofiler.client import ApplicationCostProfilerClient else: ApplicationCostProfilerClient = object`.","message":"Pylint might complain about undefined variables when using `TYPE_CHECKING` conditional imports. This is a known issue in Pylint's static analysis.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}