Registry /
type-stubs / mypy-boto3-sagemaker-featurestore-runtime
Install & Compatibility
Where this runs
tested against v1.43.37 · 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.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 198.8MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 3.7s · import 0.000s · 267MB
232MB installed
● package 232MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
SagemakerFeatureStoreRuntimeClient
✓ from mypy_boto3_sagemaker_featurestore_runtime import SagemakerFeatureStoreRuntimeClient
✗ from mypy_boto3_sagemaker_featurestore_runtime import SagemakerFeatureStoreRuntimeClient
This quickstart demonstrates how to use `mypy-boto3-sagemaker-featurestore-runtime` for type-checking a `boto3` client interaction. It defines a function to fetch a record from SageMaker Feature Store, explicitly typing the `boto3` client and the request/response payloads. This allows `mypy` to validate your API calls at static analysis time, catching potential errors before runtime.
import boto3
from mypy_boto3_sagemaker_featurestore_runtime.client import SagemakerFeatureStoreRuntimeClient
from mypy_boto3_sagemaker_featurestore_runtime.type_defs import GetRecordRequestRequestTypeDef, GetRecordResponseTypeDef
import os
def get_feature_store_record(
feature_group_name: str,
record_identifier_value_as_string: str
) -> GetRecordResponseTypeDef:
"""Fetches a record from SageMaker Feature Store with type hints."""
# boto3.client returns an untyped client by default.
# The type hint on 'client' variable applies the stubs.
client: SagemakerFeatureStoreRuntimeClient = boto3.client(
"sagemaker-featurestore-runtime",
region_name=os.environ.get("AWS_REGION", "us-east-1")
)
request_params: GetRecordRequestRequestTypeDef = {
"FeatureGroupName": feature_group_name,
"RecordIdentifierValueAsString": record_identifier_value_as_string,
"FeatureNames": ["example_feature_name"]
}
response: GetRecordResponseTypeDef = client.get_record(**request_params)
return response
# Example usage (ensure AWS credentials are set up)
if __name__ == "__main__":
try:
# Use environment variables for sensitive or dynamic values
# For a runnable example, provide dummy values if env vars are not set
example_feature_group_name = os.environ.get("SAGE_FEATURE_GROUP_NAME", "my-test-feature-group")
example_record_id = os.environ.get("SAGE_RECORD_ID", "12345")
if not os.environ.get("AWS_ACCESS_KEY_ID") or not os.environ.get("AWS_SECRET_ACCESS_KEY"):
print("WARNING: AWS credentials not found in environment. Example might fail at runtime.")
print("Please set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.")
print(f"Attempting to get record for Feature Group: {example_feature_group_name}, Record ID: {example_record_id}")
# This call is type-checked by mypy thanks to the stubs
record_data = get_feature_store_record(example_feature_group_name, example_record_id)
print("Successfully retrieved record (type-checked):")
if "Record" in record_data:
for feature in record_data["Record"]:
print(f" {feature['FeatureName']}: {feature['ValueAsString']}")
else:
print("Record key not found in response, or response is empty.")
except Exception as e:
print(f"An error occurred: {e}")
print("Ensure AWS credentials are configured and the feature group/record exist/are accessible.")
Debug
Known issues
breakingBeginning with `mypy-boto3-builder` version 8.12.0 (which generates `mypy-boto3-*` packages, including this one, corresponding to `boto3` versions around 1.34.x and above), support for Python 3.8 has been removed. Projects using these stubs must upgrade to Python 3.9 or newer.fixUpgrade your Python environment to 3.9 or later. Update your `pyproject.toml` or `setup.cfg` to reflect `python_requires >=3.9`.
affects: mypy-boto3-sagemaker-featurestore-runtime >= 1.42.0
breakingStubs generated by `mypy-boto3-builder` version 8.12.0+ are now PEP 561 compliant, changing the package structure to include the `py.typed` marker. While largely transparent, this *may* affect custom `mypy` configurations or build systems that rely on specific stub discovery paths (e.g., if you manually managed `MYPYPATH`).fixEnsure `mypy` is up-to-date. If encountering issues, review `mypy`'s documentation on stub discovery and package layout. No changes are typically required for standard setups, as `mypy` handles PEP 561 packages automatically.
affects: mypy-boto3-sagemaker-featurestore-runtime >= 1.42.0
gotcha`mypy-boto3-sagemaker-featurestore-runtime` provides type hints for `boto3`, but it is not a runtime library itself. Do not `import mypy_boto3_sagemaker_featurestore-runtime` in your application code for runtime execution. Its purpose is solely for static analysis tools like `mypy`.fixOnly import symbols from the `mypy_boto3_sagemaker_featurestore_runtime` package for type annotations (e.g., in a `from typing import TYPE_CHECKING` block or as explicit type hints). Your application code should continue to `import boto3`.
affects: All versions
gotchaThese stubs are a complement to `boto3`. You must still install `boto3` itself for your application to run. The `mypy-boto3-sagemaker-featurestore-runtime` package does not bundle or install `boto3` for you.fixEnsure `pip install boto3` is part of your project's runtime dependencies, in addition to installing these stubs for type checking.
affects: All versions
breakingIn `mypy-boto3-builder` version 8.9.0+, some `TypedDict` argument types for API calls (e.g., `CreateDistributionRequestRequestTypeDef` from CloudFront) were shortened to `CreateDistributionRequestTypeDef`. Additionally, conflicting `TypedDict` `Extra` postfixes moved to the end (e.g., `CreateDistributionExtraRequestTypeDef` became `CreateDistributionRequestExtraTypeDef`). While this specific service may not be heavily impacted, it's a breaking change for the `mypy-boto3` ecosystem.fixReview your `TypedDict` usage and update names according to the latest stubs. `mypy` will guide you with type errors if you are using affected `TypedDict`s.
affects: mypy-boto3-sagemaker-featurestore-runtime versions generated by builder 8.9.0+ (approximately >=1.34.0)
Upgrade
Version history
1.43.37latest on PyPI · released Jun 29, 2026
Audit
Dependencies
boto3requiredProvides the runtime library that these stubs type-check. Not a direct dependency, but required for usage.
mypyoptionalThe static type checker that utilizes these stubs. Other type checkers may also be used.
typing-extensionsoptionalProvides backported type features (e.g., `NotRequired`) for older Python versions (<3.11). Automatically handled by `mypy-boto3-builder`'s dependency resolution.