{"id":3697,"library":"mypy-boto3-sagemaker-geospatial","title":"mypy-boto3-sagemaker-geospatial Type Annotations","description":"This library provides type annotations for the `boto3` client for AWS SageMaker Geospatial capabilities, compatible with `mypy`, VSCode, PyCharm, and other static analysis tools. It is automatically generated by `mypy-boto3-builder` and updated frequently to align with new `boto3` and AWS API releases, ensuring comprehensive type checking for your AWS interactions.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["boto3","mypy","aws","type-annotations","sagemaker","geospatial","stubs"],"install":[{"cmd":"pip install mypy-boto3-sagemaker-geospatial boto3","lang":"bash","label":"Install with boto3"},{"cmd":"pip install mypy-boto3-sagemaker-geospatial","lang":"bash","label":"Standalone installation (requires boto3 installed separately)"}],"dependencies":[{"reason":"Provides the AWS SDK runtime library for which these are type annotations.","package":"boto3","optional":false},{"reason":"The static type checker that utilizes these annotations.","package":"mypy","optional":true},{"reason":"Minimum required Python version.","package":"python","optional":false}],"imports":[{"note":"Imports the type for the SageMaker Geospatial client.","symbol":"SagemakerGeospatialClient","correct":"from mypy_boto3_sagemaker_geospatial.client import SagemakerGeospatialClient"},{"note":"Imports a specific TypedDict for response structures.","symbol":"ListEarthObservationJobsOutputTypeDef","correct":"from mypy_boto3_sagemaker_geospatial.type_defs import ListEarthObservationJobsOutputTypeDef"}],"quickstart":{"code":"import boto3\nimport os\nfrom typing import TYPE_CHECKING\n\nif TYPE_CHECKING:\n    from mypy_boto3_sagemaker_geospatial.client import SagemakerGeospatialClient\n    from mypy_boto3_sagemaker_geospatial.type_defs import ListEarthObservationJobsOutputTypeDef\n\n\ndef get_sagemaker_geospatial_client() -> 'SagemakerGeospatialClient':\n    \"\"\"Returns a type-hinted SageMaker Geospatial client.\"\"\"\n    client: SagemakerGeospatialClient = boto3.client(\n        \"sagemaker-geospatial\",\n        region_name=os.environ.get(\"AWS_REGION\", \"us-west-2\")\n    )\n    return client\n\ndef list_geospatial_jobs():\n    \"\"\"Lists SageMaker Earth Observation Jobs with type hints.\"\"\"\n    client = get_sagemaker_geospatial_client()\n    response: ListEarthObservationJobsOutputTypeDef = client.list_earth_observation_jobs(\n        MaxResults=5\n    )\n    print(\"Successfully listed Earth Observation Jobs.\")\n    for job in response.get('EarthObservationJobSummaries', []):\n        print(f\" - Job ID: {job['Arn']}, Status: {job['Status']}\")\n\nif __name__ == '__main__':\n    # This assumes AWS credentials and default region are configured (e.g., via ~/.aws/credentials or environment variables)\n    # For local testing without actual AWS calls, you might mock boto3.client.\n    try:\n        list_geospatial_jobs()\n    except Exception as e:\n        print(f\"An error occurred: {e}\")\n","lang":"python","description":"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."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or higher. (e.g., `pyenv install 3.9.18`)","message":"Python 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.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0"},{"fix":"Ensure your project setup correctly handles PEP 561 package discovery. For most users, `pip install` handles this automatically.","message":"The `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.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0"},{"fix":"Always ensure `boto3` is installed alongside this stub package (e.g., `pip install boto3 mypy-boto3-sagemaker-geospatial`).","message":"This package provides only type annotations; the `boto3` library itself must be installed in your environment for the code to run.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Review and update your `TypedDict` imports and usage to reflect the shorter, canonical names if you encounter `NameError` or type checking failures.","message":"TypeDef 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.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.9.0"},{"fix":"If experiencing PyCharm performance issues, consider installing `mypy-boto3-sagemaker-geospatial-lite` instead, or disable PyCharm's internal type checker and use `mypy` directly.","message":"When 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.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}