Registry /
type-stubs / mypy-boto3-marketplace-entitlement
Install & Compatibility
Where this runs
tested against v1.43.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 116.5MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 5.8s · import 0.000s · 114MB
114MB installed
● package 114MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
MarketplaceEntitlementClient
✓ from mypy_boto3_marketplace_entitlement import MarketplaceEntitlementClient
✗ from boto3.client import MarketplaceEntitlementService
The direct client class comes from the stub package, not boto3 itself for type hinting.
GetEntitlementsResultTypeDef
✓ from mypy_boto3_marketplace_entitlement.type_defs import GetEntitlementsResultTypeDef
✗ from mypy_boto3_marketplace_entitlement.service_resource import GetEntitlementsResultTypeDef
Type definitions are typically found in the `type_defs` submodule for clarity.
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.
import boto3
from mypy_boto3_marketplace_entitlement import MarketplaceEntitlementClient
from mypy_boto3_marketplace_entitlement.type_defs import GetEntitlementsResultTypeDef, GetEntitlementsRequestRequestTypeDef
# Instantiate a boto3 client with type hints
client: MarketplaceEntitlementClient = boto3.client("marketplace-entitlement")
# Example usage with type-hinted parameters and return value
request_params: GetEntitlementsRequestRequestTypeDef = {
"ProductCode": os.environ.get('MARKETPLACE_PRODUCT_CODE', 'some-product-code'),
"Filter": {
"CUSTOMER_IDENTIFIER": [
os.environ.get('AWS_ACCOUNT_ID', '123456789012')
]
}
}
try:
response: GetEntitlementsResultTypeDef = client.get_entitlements(**request_params)
print("Successfully retrieved entitlements:")
for entitlement in response.get('Entitlements', []):
print(f" Entitlement: {entitlement.get('ProductCode')} for {entitlement.get('CustomerIdentifier')}")
except Exception as e:
print(f"Error retrieving entitlements: {e}")
# To verify with mypy, save this to a file (e.g., `main.py`) and run `mypy main.py`
Debug
Known issues
breakingPython 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.fixUpgrade 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.
affects: mypy-boto3-marketplace-entitlement versions generated by builder 8.12.0+ (e.g., 1.42.58 and newer)
breakingThe `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.fixEnsure 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.
affects: mypy-boto3-marketplace-entitlement versions generated by builder 8.12.0+ (e.g., 1.42.58 and newer)
breakingType 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.fixReview 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.
affects: mypy-boto3-marketplace-entitlement versions generated by builder 8.9.0+ (e.g., 1.42.58 and newer)
gotchaThis 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`.fixAlways install `boto3` alongside `mypy-boto3-marketplace-entitlement` using `pip install boto3 mypy-boto3-marketplace-entitlement`.
affects: All versions
gotchaCompatibility 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.fixKeep your `mypy` installation up-to-date (`pip install --upgrade mypy`) to ensure full compatibility and accurate type checking.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredProvides the runtime functionality for the AWS SDK; this package only provides type stubs.
mypyrequiredRequired for static type checking; this package's primary purpose is to provide types for mypy.
typing-extensionsoptionalOften required for compatibility with older Python versions for new typing features.