mypy-boto3-sagemaker-edge provides type annotations for the boto3 SagemakerEdgeManager client, enhancing type checking capabilities for tools like MyPy, VSCode, and PyCharm. It is automatically generated by the `mypy-boto3-builder` and released frequently, typically in sync with `boto3` versions, to ensure up-to-date and accurate type hints. The current version is 1.42.3.
pip install mypy-boto3-sagemaker-edge boto3Verified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize a `boto3` SagemakerEdgeManager client with type annotations provided by `mypy-boto3-sagemaker-edge` and perform a basic operation like `send_heartbeat`. The `TYPE_CHECKING` block ensures that the stub types are only used during static analysis, preventing them from becoming a runtime dependency. Replace placeholder AWS credentials and region as needed.
Upgrade your Python environment to 3.9 or newer.
Update your static type checker (e.g., `pip install --upgrade mypy`) and verify its configuration. In most cases, installing the stub package with pip is sufficient for modern type checkers.
Ensure `mypy-boto3-sagemaker-edge` and `boto3` are updated to compatible versions. The stub's version typically reflects the `boto3` version it types (e.g., `1.42.3` for `boto3` `1.42.x`).
Wrap type-only imports within `from typing import TYPE_CHECKING` and `if TYPE_CHECKING:` blocks, as demonstrated in the `imports` and `quickstart` sections.
If using the deprecated `sms-voice` service, switch to `pinpoint-sms-voice` and install the corresponding `mypy-boto3-pinpoint-sms-voice` stub.
For PyCharm: `pip install boto3-stubs-lite[sagemaker-edge]` (if available) or adjust PyCharm's type checking settings.