{"id":3111,"library":"mypy-boto3-marketplace-entitlement","title":"mypy-boto3 Marketplace Entitlement Type Stubs","description":"This library provides type annotations (stubs) for the `boto3` Marketplace Entitlement Service, enhancing development experience with static type checking for AWS SDK usage. It's part of the `mypy-boto3` project, which generates stubs for all `boto3` services. The current version is 1.42.58, generated by `mypy-boto3-builder` 8.12.0, with releases closely following `boto3` service updates.","status":"active","version":"1.42.58","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["aws","boto3","mypy","types","typing","marketplace-entitlement","stubs"],"install":[{"cmd":"pip install mypy-boto3-marketplace-entitlement boto3 mypy","lang":"bash","label":"Install library, boto3, and mypy"}],"dependencies":[{"reason":"Provides the runtime functionality for the AWS SDK; this package only provides type stubs.","package":"boto3","optional":false},{"reason":"Required for static type checking; this package's primary purpose is to provide types for mypy.","package":"mypy","optional":false},{"reason":"Often required for compatibility with older Python versions for new typing features.","package":"typing-extensions","optional":true}],"imports":[{"note":"The direct client class comes from the stub package, not boto3 itself for type hinting.","wrong":"from boto3.client import MarketplaceEntitlementService","symbol":"MarketplaceEntitlementClient","correct":"from mypy_boto3_marketplace_entitlement import MarketplaceEntitlementClient"},{"note":"Type definitions are typically found in the `type_defs` submodule for clarity.","wrong":"from mypy_boto3_marketplace_entitlement.service_resource import GetEntitlementsResultTypeDef","symbol":"GetEntitlementsResultTypeDef","correct":"from mypy_boto3_marketplace_entitlement.type_defs import GetEntitlementsResultTypeDef"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_marketplace_entitlement import MarketplaceEntitlementClient\nfrom mypy_boto3_marketplace_entitlement.type_defs import GetEntitlementsResultTypeDef, GetEntitlementsRequestRequestTypeDef\n\n# Instantiate a boto3 client with type hints\nclient: MarketplaceEntitlementClient = boto3.client(\"marketplace-entitlement\")\n\n# Example usage with type-hinted parameters and return value\nrequest_params: GetEntitlementsRequestRequestTypeDef = {\n    \"ProductCode\": os.environ.get('MARKETPLACE_PRODUCT_CODE', 'some-product-code'),\n    \"Filter\": {\n        \"CUSTOMER_IDENTIFIER\": [\n            os.environ.get('AWS_ACCOUNT_ID', '123456789012')\n        ]\n    }\n}\n\ntry:\n    response: GetEntitlementsResultTypeDef = client.get_entitlements(**request_params)\n    print(\"Successfully retrieved entitlements:\")\n    for entitlement in response.get('Entitlements', []):\n        print(f\"  Entitlement: {entitlement.get('ProductCode')} for {entitlement.get('CustomerIdentifier')}\")\nexcept Exception as e:\n    print(f\"Error retrieving entitlements: {e}\")\n\n# To verify with mypy, save this to a file (e.g., `main.py`) and run `mypy main.py`","lang":"python","description":"This quickstart demonstrates how to initialize a `boto3` Marketplace Entitlement client with type annotations and make a sample API call. It shows how to import the specific client type and a common response `TypeDef` for robust type checking. Remember to install `boto3` and `mypy` alongside this stub package. Replace placeholder environment variables with actual values for execution."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or newer. If stuck on Python 3.8, you might need to pin to an older `mypy-boto3-marketplace-entitlement` version (e.g., <1.42.58) if available, but this is not officially supported.","message":"Python 3.8 support was removed for `mypy-boto3` packages (including this one) starting with `mypy-boto3-builder` version 8.12.0. Users on Python 3.8 will experience build failures or missing type information.","severity":"breaking","affected_versions":"mypy-boto3-marketplace-entitlement versions generated by builder 8.12.0+ (e.g., 1.42.58 and newer)"},{"fix":"Ensure your `mypy` version is up-to-date. If issues persist, verify `mypy`'s `PYTHONPATH` or `MYPYPATH` is correctly configured to locate type stubs within your environment.","message":"The `mypy-boto3` packages migrated to PEP 561 packaging (namespace packages) with `mypy-boto3-builder` version 8.12.0. This changes how type checkers discover packages, potentially causing issues in complex environments or older `mypy` versions.","severity":"breaking","affected_versions":"mypy-boto3-marketplace-entitlement versions generated by builder 8.12.0+ (e.g., 1.42.58 and newer)"},{"fix":"Review your code for any custom `TypeDef` annotations derived from `mypy-boto3` and update their names according to the new conventions. Refer to the `mypy-boto3` documentation or generated `.pyi` files for the exact new names.","message":"Type definition names for packed method arguments were shortened or adjusted to resolve conflicts starting with `mypy-boto3-builder` version 8.9.0. For example, `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`. This could lead to `NameError` for previously existing type annotations.","severity":"breaking","affected_versions":"mypy-boto3-marketplace-entitlement versions generated by builder 8.9.0+ (e.g., 1.42.58 and newer)"},{"fix":"Always install `boto3` alongside `mypy-boto3-marketplace-entitlement` using `pip install boto3 mypy-boto3-marketplace-entitlement`.","message":"This package provides only type stubs for `boto3`'s MarketplaceEntitlementService. It does not include the runtime `boto3` library itself. Using the stubs without `boto3` installed will result in runtime `ModuleNotFoundError`.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Keep your `mypy` installation up-to-date (`pip install --upgrade mypy`) to ensure full compatibility and accurate type checking.","message":"Compatibility with `mypy` itself can be a concern. Very old `mypy` versions may not fully understand the generated type stubs, especially with newer Python typing features.","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"}