Skip to content

LexRuntimeV2 module#

Index > LexRuntimeV2

Auto-generated documentation for LexRuntimeV2 type annotations stubs module mypy-boto3-lexv2-runtime.

How to install#

VSCode extension#

Add AWS Boto3 extension to your VSCode and run AWS boto3: Quick Start command.

Click Modify and select boto3 common and LexRuntimeV2.

From PyPI with pip#

Install boto3-stubs for LexRuntimeV2 service.

# install with boto3 type annotations
python -m pip install 'boto3-stubs[lexv2-runtime]'

# Lite version does not provide session.client/resource overloads
# it is more RAM-friendly, but requires explicit type annotations
python -m pip install 'boto3-stubs-lite[lexv2-runtime]'

# standalone installation
python -m pip install mypy-boto3-lexv2-runtime

How to uninstall#

python -m pip uninstall -y mypy-boto3-lexv2-runtime


Code samples can be found in Examples.


Type annotations and code completion for boto3.client("lexv2-runtime") as LexRuntimeV2Client boto3 documentation

# LexRuntimeV2Client usage example

from boto3.session import Session

from mypy_boto3_lexv2_runtime.client import LexRuntimeV2Client

def get_client() -> LexRuntimeV2Client:
    return Session().client("lexv2-runtime")


Type annotations for literals used in methods and schemas.

# ConfirmationStateType usage example

from mypy_boto3_lexv2_runtime.literals import ConfirmationStateType

def get_value() -> ConfirmationStateType:
    return "Confirmed"

Typed dictionaries#

Type annotations for typed dictionaries used in methods and schema.

# ActiveContextTimeToLiveTypeDef usage example

from mypy_boto3_lexv2_runtime.type_defs import ActiveContextTimeToLiveTypeDef

def get_value() -> ActiveContextTimeToLiveTypeDef:
    return {
        "timeToLiveInSeconds": ...,
        "turnsToLive": ...,