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.656s · 116.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 6.1s · import 0.622s · 114MB
114MB installed
● package 114MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
PersonalizeClient
✓ from mypy_boto3_personalize.client import PersonalizeClient
Client
✓ from mypy_boto3_personalize.client import Client
Alias for PersonalizeClient.
CreateDatasetRequestRequestTypeDef
✓ from mypy_boto3_personalize.type_defs import CreateDatasetRequestRequestTypeDef
CreateDatasetResponseTypeDef
✓ from mypy_boto3_personalize.type_defs import CreateDatasetResponseTypeDef
This quickstart demonstrates how to import and apply type hints for the AWS Personalize client using `mypy-boto3-personalize`. It shows the typical pattern of instantiating a `boto3` client and then annotating it with the provided `PersonalizeClient` type, enabling static type checking for your AWS SDK interactions.
import boto3
from mypy_boto3_personalize.client import PersonalizeClient
# mypy-boto3-personalize provides type hints for the boto3 client.
# You still use the standard boto3 client at runtime.
# Configure AWS credentials as usual (e.g., ~/.aws/credentials, environment variables)
# Instantiate a boto3 client and apply the type hint
personalize_client: PersonalizeClient = boto3.client("personalize")
print(f"Client type successfully inferred by mypy-boto3-personalize: {type(personalize_client)}")
# Example of how type hints are used for method calls (for static analysis).
# This code block is for demonstration of type-checking, not intended for live execution
# without proper setup and AWS resources.
# from mypy_boto3_personalize.type_defs import CreateDatasetRequestRequestTypeDef
# try:
# # Type checkers like MyPy will ensure 'name', 'datasetGroupArn', etc. are correct types
# # and that the return value matches CreateDatasetResponseTypeDef.
# create_request: CreateDatasetRequestRequestTypeDef = {
# "name": "MyNewDataset",
# "datasetGroupArn": "arn:aws:personalize:us-east-1:123456789012:dataset-group/my-group",
# "datasetType": "ITEMS",
# "schemaArn": "arn:aws:personalize:us-east-1:123456789012:schema/my-schema",
# }
# response = personalize_client.create_dataset(**create_request)
# print(f"Type-checked call example response: {response}")
# except Exception as e:
# print(f"Example call failed (expected without real AWS setup): {e}")
Debug
Known issues
breakingStarting with `mypy-boto3-builder` 8.12.0, Python 3.8 is no longer supported across all `mypy-boto3` packages, including `mypy-boto3-personalize`. Users on Python 3.8 must upgrade to Python 3.9+ or pin an older version of `mypy-boto3-personalize`.fixUpgrade your Python environment to 3.9 or newer, or pin `mypy-boto3-personalize` to an older version compatible with Python 3.8 (e.g., `<1.42.3`).
affects: >=8.12.0 (builder), effectively mypy-boto3-personalize versions generated after builder 8.12.0
breakingTypeDef naming conventions changed in `mypy-boto3-builder` 8.9.0. Specifically, `RequestTypeDef` for method arguments might be shortened (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`), and `Extra` postfixes were moved (e.g., `CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`). This can break explicit type hints for these TypeDefs.fixReview your explicit TypeDef import and usage statements and adjust names according to the new conventions. Consult the `mypy-boto3-personalize.type_defs` module for the correct names.
affects: >=8.9.0 (builder), effectively mypy-boto3-personalize versions generated after builder 8.9.0
gotcha`mypy-boto3-personalize` provides only type stubs, not the actual runtime library. You *must* install `boto3` separately for your code to run, and `mypy` to perform static analysis. Not installing `boto3` will lead to runtime `ModuleNotFoundError`.fixEnsure both `boto3` and `mypy` are installed alongside `mypy-boto3-personalize` using `pip install mypy-boto3-personalize boto3 mypy`.
affects: All versions
gotchaWhile `mypy-boto3` packages are PEP 561 compliant, `mypy` might not always automatically discover stubs in complex project setups or older `mypy` versions. Ensure `mypy` is correctly configured to find the installed type packages.fixCheck your `mypy` configuration (`pyproject.toml`, `mypy.ini`, or command-line arguments). Ensure `mypy` is running in an environment where `mypy-boto3-personalize` is installed. For advanced scenarios, explicitly specify `mypy` paths if needed.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredProvides the runtime AWS SDK that these stubs type-check.
mypyrequiredThe primary static type checker used to leverage these stubs.
typing_extensionsoptionalRequired for some type features on Python < 3.9, automatically handled by builder.