Registry / type-stubs / mypy-boto3-machinelearning

mypy-boto3-machinelearning

JSON →
library1.43.0pypypi✓ verified 22d ago

mypy-boto3-machinelearning provides type annotations for the `boto3` Machine Learning service, generated by `mypy-boto3-builder`. It enhances development experience by enabling static type checking with tools like MyPy and improving IDE autocomplete for AWS Boto3 clients, paginators, waiters, and response `TypedDict`s. The library is actively maintained with releases often mirroring `boto3` versions.

pip install mypy-boto3-machinelearning boto3
INSTALL
IMPORT
SIG · MYPY-BOTO3-MACHINE
M
mypy-boto3-machinelearning
type-stubspythonv1.43.0
Install
3.8s avg
Import
594ms
Disk
50MB
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.910 runs
installs and imports cleanly · install 0.0s · import 0.604s · 52MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 3.8s · import 0.584s · 52MB
50MB installed
● package 50MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MachineLearningClient
from mypy_boto3_machinelearning.client import MachineLearningClient
DescribeMLModelsPaginator
from mypy_boto3_machinelearning.paginator import DescribeMLModelsPaginator
MLModelAvailableWaiter
from mypy_boto3_machinelearning.waiter import MLModelAvailableWaiter
CreateMLModelInputRequestTypeDef
from mypy_boto3_machinelearning.type_defs import CreateMLModelInputRequestTypeDef

This quickstart demonstrates how to initialize a type-hinted `boto3` Machine Learning client and use it to list ML models. It leverages `mypy-boto3-machinelearning` for static type checking and improved IDE support. Ensure `boto3` and AWS credentials are configured in your environment.

import boto3 import os from mypy_boto3_machinelearning.client import MachineLearningClient def get_ml_client(region: str) -> MachineLearningClient: """Initializes and returns a type-hinted MachineLearning client.""" client: MachineLearningClient = boto3.client("machinelearning", region_name=region) return client def list_all_ml_models() -> None: """Lists all ML models using the type-hinted client.""" region = os.environ.get('AWS_REGION', 'us-east-1') try: ml_client = get_ml_client(region) print(f"Listing ML models in {region}...") response = ml_client.describe_ml_models() for model in response.get('Results', []): print(f" Model ID: {model.get('MLModelId')}, Name: {model.get('MLModelName')}") print("Successfully listed ML models.") except Exception as e: print(f"Error listing ML models: {e}") if __name__ == "__main__": # Ensure AWS credentials are configured (e.g., via environment variables or ~/.aws/credentials) # Example: export AWS_REGION='us-east-1' list_all_ml_models()
Debug
Known issues
breakingSupport for Python 3.8 has been removed in `mypy-boto3-builder` version 8.12.0 and later, affecting all generated packages including `mypy-boto3-machinelearning`. Projects now require Python >= 3.9.
fix
Upgrade your Python environment to 3.9 or newer.
affects: >=8.12.0 of mypy-boto3-builder (corresponds to mypy-boto3-machinelearning versions after this builder release)
breakingIn `mypy-boto3-builder` version 8.9.0, there were changes to `TypeDef` naming conventions. Specifically, `TypeDef`s for packed method arguments use shorter names, and conflicting `Extra` postfixes were moved to the end. This can break explicit imports of `TypeDef`s.
fix
Review and update your explicit `TypeDef` imports according to the new naming conventions, or rely on IDE auto-completion for discovery.
affects: >=8.9.0 of mypy-boto3-builder (corresponds to mypy-boto3-machinelearning versions after this builder release)
gotchaThe overarching `mypy-boto3` project has been superseded by `types-boto3` and `boto3-stubs` for general `boto3` type annotations. While service-specific packages like `mypy-boto3-machinelearning` continue to be released under their current name, be aware of the shift in the main project's branding if you are looking for generic `boto3` stubs.
fix
For general `boto3` stubs, consider installing `types-boto3` or `boto3-stubs[service1,service2]` instead of the legacy `mypy-boto3` package. For service-specific stubs, continue using `mypy-boto3-<service>`.
affects: All versions
gotchaThe library migrated to PEP 561 compliance. This means type checkers should automatically discover the stubs. However, in some IDEs (e.g., VSCode), explicit type annotations for `boto3.client()` calls are still recommended to get full auto-complete and type hint benefits due to limitations in function overload support.
fix
Always add explicit type annotations when initializing clients (e.g., `client: MachineLearningClient = boto3.client('machinelearning')`) for the best IDE experience, even if `mypy` works implicitly.
affects: >=8.12.0 of mypy-boto3-builder (corresponds to mypy-boto3-machinelearning versions after this builder release)
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredProvides runtime functionality for AWS SDK calls, which this library type-hints.
mypyoptionalPrimary static type checker used with these annotations.
typing-extensionsoptionalRequired for certain type-hinting features, especially on Python versions prior to 3.9, though it is included as a calculated dependency by the builder.
Agent activity
19 hits · last 30 days
node
16
OpenAI (training)
1
Resources
mypy-boto3-machinelearning — pip install mypy-boto3-machinelearning · libregistry