Skip to content

Examples#

Index > SagemakerEdgeManager > Examples

Auto-generated documentation for SagemakerEdgeManager type annotations stubs module mypy-boto3-sagemaker-edge.

Client#

Implicit type annotations#

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

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

# SagemakerEdgeManagerClient usage example

from boto3.session import Session


session = Session()

client = session.client("sagemaker-edge")  # (1)
result = client.get_deployments()  # (2)
  1. client: SagemakerEdgeManagerClient
  2. result: GetDeploymentsResultTypeDef

Explicit type annotations#

With boto3-stubs-lite[sagemaker-edge] or a standalone mypy_boto3_sagemaker_edge package, you have to explicitly specify client: SagemakerEdgeManagerClient 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.

# SagemakerEdgeManagerClient usage example with type annotations

from boto3.session import Session

from mypy_boto3_sagemaker_edge.client import SagemakerEdgeManagerClient
from mypy_boto3_sagemaker_edge.type_defs import GetDeploymentsResultTypeDef
from mypy_boto3_sagemaker_edge.type_defs import GetDeploymentsRequestRequestTypeDef


session = Session()

client: SagemakerEdgeManagerClient = session.client("sagemaker-edge")

kwargs: GetDeploymentsRequestRequestTypeDef = {...}
result: GetDeploymentsResultTypeDef = client.get_deployments(**kwargs)