Registry / type-stubs / mypy-boto3-personalize

mypy-boto3-personalize

JSON →
library1.43.0pypypi✓ verified 22d ago

mypy-boto3-personalize provides comprehensive type annotations for the AWS Personalize service in `boto3`. It enhances static analysis with tools like MyPy, catching potential type-related errors before runtime. The current version is 1.42.3, tracking `boto3` releases, and is part of the frequently updated `mypy-boto3-builder` ecosystem.

pip install mypy-boto3-personalize boto3 mypy
INSTALL
IMPORT
SIG · MYPY-BOTO3-PERSONA
M
mypy-boto3-personalize
type-stubspythonv1.43.0
Install
6.1s avg
Import
639ms
Disk
114MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.656s · 116.8MB
glibc
py 3.103.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`.
fix
Upgrade 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.
fix
Review 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`.
fix
Ensure 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.
fix
Check 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.
Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
mypy-boto3-personalize — pip install mypy-boto3-personalize · libregistry