Registry / type-stubs / mypy-boto3-sagemaker

mypy-boto3-sagemaker

JSON →
library1.43.81pypypi✓ verified 23d ago

mypy-boto3-sagemaker provides type annotations for the boto3 SageMaker service. These stubs are generated with mypy-boto3-builder to offer type checking and IDE auto-completion for your boto3 SageMaker clients. The library is actively maintained with frequent releases, currently at version 1.42.88, ensuring compatibility with the latest boto3 versions and Python type-hinting standards.

pip install mypy-boto3-sagemaker
INSTALL
IMPORT
SIG · MYPY-BOTO3-SAGEMAK
M
mypy-boto3-sagemaker
type-stubspythonv1.43.81
Install
3.6s avg
Import
Disk
21MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.81 · 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.000s · 22.7MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 3.6s · import 0.000s · 23MB
21MB installed
● package 21MB
Code
Verified usage

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

SageMakerClient
from mypy_boto3_sagemaker import SageMakerClient
from mypy_boto3_sagemaker import SageMakerClient

This quickstart demonstrates how to instantiate a type-hinted SageMaker client using `boto3` and `mypy-boto3-sagemaker`. The `SageMakerClient` type provides comprehensive type checking and auto-completion for all available SageMaker API operations and their parameters.

import boto3 from boto3.session import Session from mypy_boto3_sagemaker.client import SagemakerClient def get_sagemaker_client() -> SagemakerClient: # boto3 automatically picks up credentials from environment variables or AWS config. # For local testing without actual AWS calls, ensure 'boto3' is configured. session = Session() client: SagemakerClient = session.client("sagemaker") return client # Example usage (will only run if AWS credentials are set up) if __name__ == "__main__": try: sagemaker_client = get_sagemaker_client() # Access type-hinted methods, e.g., sagemaker_client.list_training_jobs() print(f"Successfully created SageMaker client: {sagemaker_client.meta.region_name}") # Uncomment below to make an actual API call (requires permissions) # response = sagemaker_client.list_training_jobs(MaxResults=1) # print(f"Training jobs: {response.get('TrainingJobSummaries')}") except Exception as e: print(f"Error creating SageMaker client or making call: {e}")
Debug
Known issues
breakingStarting with `mypy-boto3-builder` version 8.12.0 (which generates these stubs), Python 3.8 support has been removed across all packages. Additionally, packages migrated to follow PEP 561 distribution standards.
fix
Ensure your project uses Python 3.9 or higher. For older Python versions, use an older `mypy-boto3-sagemaker` release compatible with Python 3.8 (e.g., from `mypy-boto3-builder < 8.12.0`).
affects: mypy-boto3-builder >= 8.12.0 (generating mypy-boto3-sagemaker >= 1.42.88)
breakingBreaking changes in TypeDef naming conventions were introduced in `mypy-boto3-builder` 8.9.0. This includes shorter names for packed method arguments (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`) and moving `Extra` postfixes in conflicting TypeDefs (e.g., `CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`).
fix
Review and update explicit `TypeDef` imports and usage if you were relying on the older naming conventions. Refer to the specific service module's `type_defs` for the updated names.
affects: mypy-boto3-builder >= 8.9.0 (generating mypy-boto3-sagemaker >= 1.42.88)
gotchaPylint may issue `undefined-variable` warnings when using `TYPE_CHECKING` blocks to conditionally import `mypy-boto3-*` types. This is a known issue with Pylint's handling of `TYPE_CHECKING`.
fix
To fix this, explicitly set types to `object` in the `else` branch of the `TYPE_CHECKING` block. Example: `if TYPE_CHECKING: from mypy_boto3_sagemaker.client import SagemakerClient else: SagemakerClient = object`.
affects: All versions
gotchaPyCharm users might experience slow performance with Literal overloads in `boto3-stubs`. This is a known IDE issue (PY-40997).
fix
If experiencing performance issues in PyCharm, consider installing the 'lite' version of `boto3-stubs` (e.g., `pip install boto3-stubs-lite[sagemaker]`) which provides type annotations without session.client/resource overloads but requires more explicit type annotations.
affects: All versions, specific to PyCharm IDE
deprecatedThe `sms-voice` service was deprecated and removed from `mypy-boto3-builder` in version 8.11.0. Users of this service should migrate to `pinpoint-sms-voice`.
fix
If you were using stubs for `sms-voice`, switch to using stubs for `pinpoint-sms-voice` instead.
affects: mypy-boto3-builder >= 8.11.0
Upgrade
Version history
1.43.81latest on PyPI · released Aug 26, 2026
Audit
Dependencies
boto3requiredThis package provides type annotations for the 'boto3' library; 'boto3' itself is required for runtime AWS interaction.
Agent activity
20 hits · last 30 days
node
18
OpenAI (training)
1
Resources
mypy-boto3-sagemaker — pip install mypy-boto3-sagemaker · libregistry