Skip to content

Examples#

Index > SageMakergeospatialcapabilities > Examples

Auto-generated documentation for SageMakergeospatialcapabilities type annotations stubs module mypy-boto3-sagemaker-geospatial.

Client#

Implicit type annotations#

Can be used with boto3-stubs[sagemaker-geospatial] package installed.

Write your SageMakergeospatialcapabilities code as usual, type checking and code completion should work out of the box.

Client method usage example#

# SageMakergeospatialcapabilitiesClient usage example

from boto3.session import Session


session = Session()

client = session.client("sagemaker-geospatial")  # (1)
result = client.export_earth_observation_job()  # (2)
  1. client: SageMakergeospatialcapabilitiesClient
  2. result: ExportEarthObservationJobOutputTypeDef

Paginator usage example#

# ListEarthObservationJobsPaginator usage example

from boto3.session import Session


session = Session()
client = session.client("sagemaker-geospatial")  # (1)

paginator = client.get_paginator("list_earth_observation_jobs")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
  1. client: SageMakergeospatialcapabilitiesClient
  2. paginator: ListEarthObservationJobsPaginator
  3. item: ListEarthObservationJobOutputTypeDef

Explicit type annotations#

With boto3-stubs-lite[sagemaker-geospatial] or a standalone mypy_boto3_sagemaker_geospatial package, you have to explicitly specify client: SageMakergeospatialcapabilitiesClient type annotation.

All other type annotations are optional, as types should be discovered automatically. However, these type annotations can be helpful in your functions and methods.

Client method usage example#

# SageMakergeospatialcapabilitiesClient usage example with type annotations

from boto3.session import Session

from mypy_boto3_sagemaker_geospatial.client import SageMakergeospatialcapabilitiesClient
from mypy_boto3_sagemaker_geospatial.type_defs import ExportEarthObservationJobOutputTypeDef
from mypy_boto3_sagemaker_geospatial.type_defs import ExportEarthObservationJobInputTypeDef


session = Session()

client: SageMakergeospatialcapabilitiesClient = session.client("sagemaker-geospatial")

kwargs: ExportEarthObservationJobInputTypeDef = {...}
result: ExportEarthObservationJobOutputTypeDef = client.export_earth_observation_job(**kwargs)

Paginator usage example#

# ListEarthObservationJobsPaginator usage example with type annotations

from boto3.session import Session

from mypy_boto3_sagemaker_geospatial.client import SageMakergeospatialcapabilitiesClient
from mypy_boto3_sagemaker_geospatial.paginator import ListEarthObservationJobsPaginator
from mypy_boto3_sagemaker_geospatial.type_defs import ListEarthObservationJobOutputTypeDef


session = Session()
client: SageMakergeospatialcapabilitiesClient = session.client("sagemaker-geospatial")

paginator: ListEarthObservationJobsPaginator = client.get_paginator("list_earth_observation_jobs")
for item in paginator.paginate(...):
    item: ListEarthObservationJobOutputTypeDef
    print(item)