Registry /
type-stubs / mypy-boto3-sagemaker-geospatial
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.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 52MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 2.7s · import 0.000s · 52MB
50MB installed
● package 50MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
SagemakerGeospatialClient
✓ from mypy_boto3_sagemaker_geospatial.client import SagemakerGeospatialClient
Imports the type for the SageMaker Geospatial client.
ListEarthObservationJobsOutputTypeDef
✓ from mypy_boto3_sagemaker_geospatial.type_defs import ListEarthObservationJobsOutputTypeDef
Imports a specific TypedDict for response structures.
This quickstart demonstrates how to initialize a type-hinted `SageMakergeospatialcapabilities` client and use it to call `list_earth_observation_jobs`. The `TYPE_CHECKING` block ensures that the type imports are only used by type checkers, avoiding runtime dependencies. It uses environment variables for the AWS region.
import boto3
import os
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from mypy_boto3_sagemaker_geospatial.client import SagemakerGeospatialClient
from mypy_boto3_sagemaker_geospatial.type_defs import ListEarthObservationJobsOutputTypeDef
def get_sagemaker_geospatial_client() -> 'SagemakerGeospatialClient':
"""Returns a type-hinted SageMaker Geospatial client."""
client: SagemakerGeospatialClient = boto3.client(
"sagemaker-geospatial",
region_name=os.environ.get("AWS_REGION", "us-west-2")
)
return client
def list_geospatial_jobs():
"""Lists SageMaker Earth Observation Jobs with type hints."""
client = get_sagemaker_geospatial_client()
response: ListEarthObservationJobsOutputTypeDef = client.list_earth_observation_jobs(
MaxResults=5
)
print("Successfully listed Earth Observation Jobs.")
for job in response.get('EarthObservationJobSummaries', []):
print(f" - Job ID: {job['Arn']}, Status: {job['Status']}")
if __name__ == '__main__':
# This assumes AWS credentials and default region are configured (e.g., via ~/.aws/credentials or environment variables)
# For local testing without actual AWS calls, you might mock boto3.client.
try:
list_geospatial_jobs()
except Exception as e:
print(f"An error occurred: {e}")
Debug
Known issues
breakingPython 3.8 is no longer supported by the `mypy-boto3-builder` and its generated packages, including `mypy-boto3-sagemaker-geospatial`. Users must upgrade to Python 3.9 or newer.fixUpgrade your Python environment to 3.9 or higher. (e.g., `pyenv install 3.9.18`)
affects: mypy-boto3-builder >= 8.12.0
breakingThe `mypy-boto3-builder` has migrated to PEP 561 compliant packages. This might require updates to how stub packages are managed or imported in some build systems.fixEnsure your project setup correctly handles PEP 561 package discovery. For most users, `pip install` handles this automatically.
affects: mypy-boto3-builder >= 8.12.0
gotchaThis package provides only type annotations; the `boto3` library itself must be installed in your environment for the code to run.fixAlways ensure `boto3` is installed alongside this stub package (e.g., `pip install boto3 mypy-boto3-sagemaker-geospatial`).
affects: All versions
breakingTypeDef naming conventions were changed in builder version 8.9.0. For example, `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`. This could break existing type annotations that use the older, longer names.fixReview and update your `TypedDict` imports and usage to reflect the shorter, canonical names if you encounter `NameError` or type checking failures.
affects: mypy-boto3-builder >= 8.9.0
gotchaWhen using PyCharm, performance issues may occur with `Literal` overloads, leading to high CPU usage. In such cases, `mypy-boto3-lite` packages are recommended as an alternative.fixIf experiencing PyCharm performance issues, consider installing `mypy-boto3-sagemaker-geospatial-lite` instead, or disable PyCharm's internal type checker and use `mypy` directly.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredProvides the AWS SDK runtime library for which these are type annotations.
mypyoptionalThe static type checker that utilizes these annotations.
pythonrequiredMinimum required Python version.