Type annotations for boto3.LexRuntimeService 1.14.0 service, generated by mypy-boto3-buider 2.1.0
Project description
mypy-boto3-lex-runtime
Type annotations for boto3.LexRuntimeService 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 LexRuntimeService
service.
python -m pip install boto3-stubs[lex-runtime]
How to use
Client annotations
LexRuntimeServiceClient
provides annotations for boto3.client("lex-runtime")
.
import boto3
from mypy_boto3_lex_runtime import LexRuntimeServiceClient
client: LexRuntimeServiceClient = boto3.client("lex-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: LexRuntimeServiceClient = session.client("lex-runtime")
Typed dictionations
mypy_boto3_lex_runtime.type_defs
module contains structures and shapes assembled
to typed dictionaries for additional type checking.
from mypy_boto3_lex_runtime.type_defs import ButtonTypeDef, ...
def get_structure() -> ButtonTypeDef:
return {
...
}
Dynamic type annotations
mypy_boto3
command generates boto3.client/resource
type annotations for
mypy_boto3_lex_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("lex-runtime")
session_client = boto3.Session().client("lex-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-lex-runtime-1.14.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | dce179d2664689a58606640042179fc30c98fc9a81fbea8bf016658ce38cc26e |
|
MD5 | 707474d8a7e9898983be1195161d76e4 |
|
BLAKE2b-256 | 381e355dc1731401427451e6ff0494fa2ecf21f46b2e2f21b867cb7c865858e4 |
Hashes for mypy_boto3_lex_runtime-1.14.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 645a03e03aebb1984a0fd622719bcb8788369bb4a12725f1e250531bc94cef18 |
|
MD5 | cc187d060229302e7aaa271685aeb7c7 |
|
BLAKE2b-256 | b9b9cf9f67669ab4c24dd3d576f1eaa84243110ffc0de935c147c2d36fc303dd |