{"id":3628,"library":"mypy-boto3-marketplacecommerceanalytics","title":"Type annotations for boto3 MarketplaceCommerceAnalytics","description":"This package provides static type annotations for the `boto3` Marketplace Commerce Analytics service, enhancing developer experience by enabling IDE autocompletion, type checking with `mypy` or `pyright`, and early detection of potential API usage errors. It is generated by `mypy-boto3-builder 8.12.0` and currently supports `boto3` version `1.42.3`.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["mypy","boto3","aws","type-annotations","stubs","marketplace","marketplacecommerceanalytics"],"install":[{"cmd":"pip install mypy-boto3-marketplacecommerceanalytics","lang":"bash","label":"Install"}],"dependencies":[{"reason":"Provides the AWS SDK for Python, which this package type-annotates.","package":"boto3","optional":false},{"reason":"Requires Python 3.9 or newer for full compatibility with type features.","package":"python","optional":false}],"imports":[{"symbol":"MarketplaceCommerceAnalyticsClient","correct":"from mypy_boto3_marketplacecommerceanalytics.client import MarketplaceCommerceAnalyticsClient"},{"symbol":"GenerateDataSetRequestTypeDef","correct":"from mypy_boto3_marketplacecommerceanalytics.type_defs import GenerateDataSetRequestTypeDef"},{"symbol":"GenerateDataSetResponseTypeDef","correct":"from mypy_boto3_marketplacecommerceanalytics.type_defs import GenerateDataSetResponseTypeDef"}],"quickstart":{"code":"import os\nfrom datetime import datetime\n\nimport boto3\nfrom mypy_boto3_marketplacecommerceanalytics.client import MarketplaceCommerceAnalyticsClient\nfrom mypy_boto3_marketplacecommerceanalytics.type_defs import GenerateDataSetRequestTypeDef, GenerateDataSetResponseTypeDef\n\n\ndef get_marketplace_analytics_client() -> MarketplaceCommerceAnalyticsClient:\n    \"\"\"Returns a type-annotated MarketplaceCommerceAnalytics client.\"\"\"\n    session = boto3.Session(\n        aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID', 'DUMMY_KEY'),\n        aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY', 'DUMMY_SECRET'),\n        region_name=os.environ.get('AWS_DEFAULT_REGION', 'us-east-1')\n    )\n    return session.client(\"marketplacecommerceanalytics\")\n\n\nif __name__ == \"__main__\":\n    client: MarketplaceCommerceAnalyticsClient = get_marketplace_analytics_client()\n\n    request_params: GenerateDataSetRequestTypeDef = {\n        \"DataSetType\": \"example-data-set-type\",\n        \"DataSetPublicationDate\": datetime(2023, 1, 1),\n        \"RoleNameArn\": \"arn:aws:iam::123456789012:role/MyMarketplaceAnalyticsRole\",\n        \"DestinationS3BucketName\": \"my-marketplace-data-bucket\",\n        \"DestinationS3Prefix\": \"marketplace-analytics/\",\n        \"SnsTopicArn\": \"arn:aws:sns:us-east-1:123456789012:MyMarketplaceAnalyticsTopic\",\n        \"CustomerDefinedValues\": {\"key1\": \"value1\"}\n    }\n\n    try:\n        response: GenerateDataSetResponseTypeDef = client.generate_data_set(**request_params)\n        print(f\"Data set generation started. Status: {response.get('DataSetRequestId')}\")\n    except client.exceptions.ClientError as e:\n        print(f\"Error generating data set: {e}\")\n    except Exception as e:\n        print(f\"An unexpected error occurred: {e}\")\n","lang":"python","description":"This quickstart demonstrates how to create a type-hinted `MarketplaceCommerceAnalyticsClient` and call the `generate_data_set` method with a type-hinted request payload. It uses `os.environ.get` for AWS credentials and region, making it runnable after setting appropriate environment variables. Replace placeholder values with your actual AWS resource ARNs and bucket names."},"warnings":[{"fix":"Upgrade your Python environment to version 3.9 or later.","message":"Python 3.8 support has been removed. All `mypy-boto3` packages, including `mypy-boto3-marketplacecommerceanalytics`, now require Python 3.9 or newer.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0"},{"fix":"Ensure your `mypy` configuration is up-to-date and leverages standard PEP 561 package discovery. If encountering issues, review `mypy`'s module search path configuration.","message":"The `mypy-boto3-builder` migrated to PEP 561 compliant packages. While direct `from mypy_boto3_...` imports should generally be unaffected, this change might influence advanced `mypy` configurations or custom import resolvers.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0"},{"fix":"Review your code for `TypeDef` imports and usage, updating them to the new, often shorter, naming conventions. Check the documentation for the specific service's `type_defs` module.","message":"TypeDef naming conventions were changed (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). If you previously relied on auto-generated or inferred `TypeDef` names, they might have changed.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.9.0"},{"fix":"Add explicit type annotations to your `boto3` client and resource objects.","message":"For the best autocompletion and static analysis experience, always explicitly type-annotate your `boto3` client variables with the corresponding `mypy-boto3` client type (e.g., `client: MarketplaceCommerceAnalyticsClient = session.client(\"marketplacecommerceanalytics\")`).","severity":"gotcha","affected_versions":"All versions"},{"fix":"Align your installed `mypy-boto3-marketplacecommerceanalytics` package version with your `boto3` installation's version to ensure accurate type hints. For example, `mypy-boto3-marketplacecommerceanalytics==1.42.3` is designed for `boto3==1.42.3`.","message":"The `mypy-boto3-*` packages are generated against specific `boto3` versions. Using a `mypy-boto3` stub package with a significantly different `boto3` runtime version can lead to mismatches in type hints, missing attributes, or incorrect API signatures.","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"}