{"id":3030,"library":"mypy-boto3-bcm-data-exports","title":"mypy-boto3-bcm-data-exports Type Annotations","description":"mypy-boto3-bcm-data-exports provides a set of type annotations for the `boto3` AWS SDK, specifically for the Billing and Cost Management Data Exports (BCM Data Exports) service. These annotations enhance code completion, static analysis, and type checking for `boto3` users with tools like MyPy, VSCode, and PyCharm. The library is currently at version 1.42.77 and is released frequently, typically in sync with `boto3` and `botocore` updates.","status":"active","version":"1.42.77","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["AWS","boto3","mypy","type-hinting","stubs","cloud"],"install":[{"cmd":"pip install mypy-boto3-bcm-data-exports","lang":"bash","label":"Install service-specific stubs"},{"cmd":"pip install boto3-stubs[bcm-data-exports]","lang":"bash","label":"Install via boto3-stubs extras"}],"dependencies":[{"reason":"Provides the runtime functionality for which these are type stubs.","package":"boto3"}],"imports":[{"note":"Importing the specific client type for BCM Data Exports.","symbol":"BCMDataExportsClient","correct":"from mypy_boto3_bcm_data_exports.client import BCMDataExportsClient"},{"note":"Importing the specific service resource type if applicable for this service.","symbol":"BCMDataExportsServiceResource","correct":"from mypy_boto3_bcm_data_exports.service_resource import BCMDataExportsServiceResource"},{"note":"Example of importing a generated TypedDict for request parameters.","symbol":"CreateExportRequestRequestTypeDef","correct":"from mypy_boto3_bcm_data_exports.type_defs import CreateExportRequestRequestTypeDef"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_bcm_data_exports.client import BCMDataExportsClient\n\ndef get_bcm_data_exports_client() -> BCMDataExportsClient:\n    \"\"\"Returns a type-hinted BCM Data Exports client.\"\"\"\n    client: BCMDataExportsClient = boto3.client(\n        \"bcm-data-exports\",\n        region_name=\"us-east-1\",\n        aws_access_key_id=\"{}\".format(os.environ.get('AWS_ACCESS_KEY_ID', '')),\n        aws_secret_access_key=\"{}\".format(os.environ.get('AWS_SECRET_ACCESS_KEY', '')),\n    )\n    return client\n\n# Example usage:\nif __name__ == \"__main__\":\n    import os\n    client = get_bcm_data_exports_client()\n    # You can now use 'client' with full type hints and autocomplete\n    # For example, to list exports:\n    try:\n        response = client.list_exports()\n        print(\"Successfully listed BCM Data Exports:\")\n        for export in response.get('Exports', []):\n            print(f\"  - {export.get('ExportArn')}\")\n    except Exception as e:\n        print(f\"Error listing exports: {e}\")","lang":"python","description":"This quickstart demonstrates how to initialize a `bcm-data-exports` client using `boto3` and explicitly annotate it with the `BCMDataExportsClient` type from `mypy-boto3-bcm-data-exports` for enhanced type checking and IDE support. It includes a basic example of calling `list_exports`."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or higher. If not possible, pin `mypy-boto3-bcm-data-exports` to a version older than 8.12.0 (e.g., `mypy-boto3-bcm-data-exports<8.12.0`).","message":"Python 3.8 support has been officially removed for all `mypy-boto3` packages. Projects targeting Python 3.8 must use older versions of `mypy-boto3` or `mypy-boto3-builder`.","severity":"breaking","affected_versions":">=8.12.0"},{"fix":"Ensure your type checker (e.g., MyPy) is up-to-date. In most cases, this change is transparent, but if issues arise, check your `mypy` configuration for `mypy_path` or similar settings that might conflict with `py.typed` discovery.","message":"All `mypy-boto3` packages, including `mypy-boto3-bcm-data-exports`, have migrated to PEP 561 `py.typed` packages. This changes how type checkers discover stubs and might require updates to your `mypy` configuration or import paths if you were relying on older, non-PEP 561 compatible patterns.","severity":"breaking","affected_versions":">=8.12.0"},{"fix":"Review your code for direct imports of `mypy_boto3_bcm_data_exports.type_defs` and update `TypedDict` names to match the new conventions as indicated by your type checker.","message":"TypeDef naming conventions were changed, potentially affecting custom code that directly imports or references generated `TypedDict` names. For example, some 'RequestRequestTypeDef' names were shortened, and 'Extra' postfixes were moved.","severity":"breaking","affected_versions":">=8.9.0"},{"fix":"Always explicitly annotate your `boto3` client and resource variables with the imported `Client` or `ServiceResource` types (e.g., `client: BCMDataExportsClient = boto3.client(...)`).","message":"Explicit type annotations are highly recommended (and sometimes required, e.g., for `lite` versions) for `boto3.client()` and `boto3.resource()` calls to fully leverage `mypy-boto3` type checking and IDE autocomplete.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure `pip install boto3` is part of your project's dependencies.","message":"`mypy-boto3-bcm-data-exports` provides *type annotations* only; it does not include `boto3` itself. `boto3` must be installed separately for your application to run.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Regularly update both `boto3` and its corresponding `mypy-boto3-*` stub packages. Consider using `pip install 'boto3-stubs[bcm-data-exports]'` which often manages this synchronization.","message":"The `mypy-boto3` packages are generated for specific `boto3` versions. To ensure correct type checking, it is crucial to keep your `mypy-boto3-bcm-data-exports` package version synchronized with your installed `boto3` runtime version.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}