Type annotations for boto3.SageMakerRuntime 1.14.0 service, generated by mypy-boto3-buider 2.1.0
Project description
mypy-boto3-sagemaker-runtime
Type annotations for boto3.SageMakerRuntime 1.14.0 service compatible with mypy, VSCode, PyCharm and other tools.
Generated by mypy-boto3-buider 2.1.0.
More information can be found on boto3-stubs page.
How to install
Make sure you have mypy installed and activated in your IDE.
Install boto3-stubs
for SageMakerRuntime
service.
python -m pip install boto3-stubs[sagemaker-runtime]
How to use
Client annotations
SageMakerRuntimeClient
provides annotations for boto3.client("sagemaker-runtime")
.
import boto3
from mypy_boto3_sagemaker_runtime import SageMakerRuntimeClient
client: SageMakerRuntimeClient = boto3.client("sagemaker-runtime")
# now client usage is checked by mypy and IDE should provide code auto-complete
# works for session as well
session = boto3.session.Session(region="us-west-1")
session_client: SageMakerRuntimeClient = session.client("sagemaker-runtime")
Typed dictionations
mypy_boto3_sagemaker_runtime.type_defs
module contains structures and shapes assembled
to typed dictionaries for additional type checking.
from mypy_boto3_sagemaker_runtime.type_defs import InvokeEndpointOutputTypeDef, ...
def get_structure() -> InvokeEndpointOutputTypeDef:
return {
...
}
Dynamic type annotations
mypy_boto3
command generates boto3.client/resource
type annotations for
mypy_boto3_sagemaker_runtime
and other installed services.
# Run this command after you add or remove service packages
python -m mypy_boto3
Generated type annotations provide overloads for boto3.client
and boto3.resource
,
boto3.Session.client
and boto3.Session.resource
functions,
so explicit type annotations are not needed.
mypy
supports function overloads as expectedPyCharm
also supports function overloads, but consumes a lot of RAM, use carefully if you have many services installedVSCode
does not currently support function overloads, use explicit type annotations
import boto3
# Type is discovered correctly by mypy and PyCharm
# VSCode still needs explicit type annotations
client = boto3.client("sagemaker-runtime")
session_client = boto3.Session().client("sagemaker-runtime")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mypy-boto3-sagemaker-runtime-1.14.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f4c3ec07b417de17b698c5279c1ac4c3ee43c2338e3bd4b279d7595a1149c54 |
|
MD5 | bed14ded667b7e770d9d58137860b67a |
|
BLAKE2b-256 | f6a972dbb3df87aa154665a5a3d7536d592dfff0303f43ba49efc0e55b71589a |
Hashes for mypy_boto3_sagemaker_runtime-1.14.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e9128db433c75f4d97fa47b62447bd8a142528b7c43e32b1a9daa7d0f865dcf |
|
MD5 | f748558755b9b0f89334315991e5e8d5 |
|
BLAKE2b-256 | ec31bd33ca2204bed1f59a4f0098842826e8b6b9c1616f82df0dee14fc25fb47 |