Registry / type-stubs / mypy-boto3-sagemaker-edge

mypy-boto3-sagemaker-edge

JSON →
library1.43.0pypypi✓ verified 22d ago

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 boto3
INSTALL
IMPORT
SIG · MYPY-BOTO3-SAGEMAK
M
mypy-boto3-sagemaker-edge
type-stubspythonv1.43.0
Install
3.8s avg
Import
11ms
Disk
50MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.010s · 51.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.8s · import 0.006s · 52MB
50MB installed
● package 50MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SagemakerEdgeManagerClient
from typing import TYPE_CHECKING import boto3 if TYPE_CHECKING: from mypy_boto3_sagemaker_edge.client import SagemakerEdgeManagerClient from mypy_boto3_sagemaker_edge.type_defs import SendHeartbeatRequestRequestTypeDef def get_client() -> SagemakerEdgeManagerClient: return boto3.client("sagemaker-edge")
import boto3 client = boto3.client("sagemaker-edge")
Without `mypy-boto3-sagemaker-edge` or `TYPE_CHECKING` guards, `boto3.client` will return a `BaseClient` without service-specific type hints. Explicitly importing `SagemakerEdgeManagerClient` under `TYPE_CHECKING` provides full type fidelity without adding runtime dependency.

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.

import boto3 from typing import TYPE_CHECKING import os if TYPE_CHECKING: from mypy_boto3_sagemaker_edge.client import SagemakerEdgeManagerClient from mypy_boto3_sagemaker_edge.type_defs import SendHeartbeatRequestRequestTypeDef # Configure AWS credentials and region (replace with your actual configuration) # For quickstart, using environment variables or placeholder for simplicity os.environ['AWS_ACCESS_KEY_ID'] = os.environ.get('AWS_ACCESS_KEY_ID', 'YOUR_ACCESS_KEY') os.environ['AWS_SECRET_ACCESS_KEY'] = os.environ.get('AWS_SECRET_ACCESS_KEY', 'YOUR_SECRET_KEY') os.environ['AWS_REGION_NAME'] = os.environ.get('AWS_REGION_NAME', 'us-east-1') def main(): # Initialize the Sagemaker Edge Manager client with type hints client: SagemakerEdgeManagerClient = boto3.client("sagemaker-edge") # Example: Prepare a request for sending heartbeat with type definition heartbeat_request: SendHeartbeatRequestRequestTypeDef = { "AgentMetrics": [], # List of AgentMetricTypeDef "Models": [] # List of ModelTypeDef } try: # Call an operation on the client response = client.send_heartbeat(**heartbeat_request) print("Heartbeat sent successfully.") print(f"Response Metadata: {response['ResponseMetadata']}") except client.exceptions.InternalServiceException as e: print(f"Error sending heartbeat: {e}") except Exception as e: print(f"An unexpected error occurred: {e}") if __name__ == "__main__": main()
Debug
Known issues
breakingSupport for Python 3.8 has been removed in `mypy-boto3-builder` (version 8.12.0) and consequently for all generated `mypy-boto3-*` packages. Users must use Python 3.9 or higher.
fix
Upgrade your Python environment to 3.9 or newer.
affects: mypy-boto3-builder >=8.12.0
breakingThe `mypy-boto3` ecosystem migrated to PEP 561 compliant packages in `mypy-boto3-builder` 8.12.0. This change affects how type checkers locate stubs. If you experience issues, ensure your type checker (e.g., MyPy, Pyright) is up-to-date and configured correctly to discover installed stub packages.
fix
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.
affects: mypy-boto3-builder >=8.12.0
gotchaFor optimal type checking, the `mypy-boto3-sagemaker-edge` package version should align closely with your installed `boto3` version. Mismatching versions (e.g., using `mypy-boto3-sagemaker-edge==1.42.x` with `boto3==1.34.x`) can lead to incorrect or missing type hints.
fix
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`).
affects: All versions
gotchaTo prevent `mypy-boto3-*` packages from becoming runtime dependencies, it is best practice to import the type hints only within an `if TYPE_CHECKING:` block. This avoids shipping type stubs with your production code.
fix
Wrap type-only imports within `from typing import TYPE_CHECKING` and `if TYPE_CHECKING:` blocks, as demonstrated in the `imports` and `quickstart` sections.
affects: All versions
deprecatedThe `sms-voice` service was removed and is no longer supported starting with `mypy-boto3-builder` 8.11.0. Users of `sms-voice` should migrate to `pinpoint-sms-voice`. While not directly related to `sagemaker-edge`, this highlights potential service deprecations across the `mypy-boto3` ecosystem.
fix
If using the deprecated `sms-voice` service, switch to `pinpoint-sms-voice` and install the corresponding `mypy-boto3-pinpoint-sms-voice` stub.
affects: mypy-boto3-builder >=8.11.0
gotchaPyCharm users might experience performance issues due to Literal overloads. For better IDE performance, consider installing `boto3-stubs-lite` (if available for the specific service) or disable PyCharm's built-in type checker and rely on `mypy` or `pyright` instead.
fix
For PyCharm: `pip install boto3-stubs-lite[sagemaker-edge]` (if available) or adjust PyCharm's type checking settings.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredProvides the actual AWS SDK functionality; mypy-boto3-sagemaker-edge offers only type stubs.
mypyoptionalCommonly used static type checker for Python; optional for runtime, but essential for type checking.
pyrightoptionalAlternative static type checker; optional for runtime, but useful for type checking.
Agent activity
15 hits · last 30 days
node
12
OpenAI (training)
1
Resources
mypy-boto3-sagemaker-edge — pip install mypy-boto3-sagemaker-edge · libregistry