Registry / type-stubs / mypy-boto3-lexv2-models

mypy-boto3-lexv2-models

JSON →
library1.43.5pypypi✓ verified 22d ago

mypy-boto3-lexv2-models provides comprehensive type annotations for the `boto3` LexModelsV2 service. This package, currently at version 1.42.65, is generated using `mypy-boto3-builder 8.12.0` and aims to enhance static type checking and IDE auto-completion for `boto3` users. It follows an active release cadence, typically updating in sync with `boto3` and `botocore` releases to ensure up-to-date type definitions.

pip install mypy-boto3-lexv2-models boto3
INSTALL
IMPORT
SIG · MYPY-BOTO3-LEXV2-M
M
mypy-boto3-lexv2-models
type-stubspythonv1.43.5
Install
4.0s avg
Import
748ms
Disk
51MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.5 · 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.774s · 52.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 4.0s · import 0.722s · 53MB
51MB installed
● package 51MB
Code
Verified usage

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

LexModelsV2Client
from mypy_boto3_lexv2_models import LexModelsV2Client
LexModelsV2Client
from mypy_boto3_lexv2_models.client import LexModelsV2Client
Paginator
from mypy_boto3_lexv2_models.paginator import ListBotsPaginator
Paginator types are specific to each paginable operation.
Waiter
from mypy_boto3_lexv2_models.waiter import BotLocaleBuiltWaiter
Waiter types are specific to each waitable operation.
TypedDict
from mypy_boto3_lexv2_models.type_defs import BotSummaryTypeDef
Type definitions for API request/response structures are found in `type_defs`.
Literal
from mypy_boto3_lexv2_models.literals import BotStatusType
Literal types for string-based enums are found in `literals`.

This example demonstrates how to obtain a type-hinted `LexModelsV2Client` using `boto3` and then use it to list Lex V2 bots. It leverages `TYPE_CHECKING` for conditional import of the stub types, ensuring they are only used during static analysis.

import boto3 from typing import TYPE_CHECKING import os if TYPE_CHECKING: from mypy_boto3_lexv2_models import LexModelsV2Client from mypy_boto3_lexv2_models.type_defs import BotSummaryTypeDef def get_lexv2_client() -> 'LexModelsV2Client': """Returns a type-hinted LexModelsV2 client.""" # Ensure AWS credentials are set up (e.g., via environment variables or ~/.aws/credentials) # Using os.environ.get for demonstration purposes in a runnable quickstart. # In a real application, boto3 will find credentials automatically. if not os.environ.get('AWS_ACCESS_KEY_ID'): print("Warning: AWS_ACCESS_KEY_ID not set. This example may fail without credentials.") return boto3.client("lexv2") def list_all_lex_bots(): client = get_lexv2_client() print("Listing Lex V2 bots...") try: response = client.list_bots(sortBy={ 'attribute': 'BotName', 'order': 'Ascending' }) bots: list['BotSummaryTypeDef'] = response['botSummaries'] if bots: for bot in bots: print(f" Bot Name: {bot['botName']}, Status: {bot['botStatus']}") else: print(" No Lex V2 bots found.") except Exception as e: print(f"Error listing bots: {e}") if __name__ == "__main__": list_all_lex_bots()
Debug
Known issues
breakingSupport for Python 3.8 was removed in `mypy-boto3-builder 8.12.0`, which generates this package. Ensure your environment uses Python 3.9 or newer.
fix
Upgrade your Python interpreter to version 3.9 or higher.
affects: mypy-boto3-builder >= 8.12.0
breakingSome generated `TypeDef` names were shortened in `mypy-boto3-builder 8.9.0`. For example, `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`.
fix
Update your code to use the new, shorter `TypeDef` names where applicable. Review your type hint usage for affected services.
affects: mypy-boto3-builder >= 8.9.0
gotchaThis package provides only type annotations and does not include the actual `boto3` runtime library. `boto3` must be installed separately for your application to function at runtime.
fix
Ensure `boto3` is included in your project's dependencies (e.g., `pip install boto3`).
affects: all
gotchaFor Pylint compatibility and to avoid runtime dependencies on stub packages, it is recommended to conditionally import type hints using `if TYPE_CHECKING: ... else: ...` blocks.
fix
Wrap type stub imports within `if TYPE_CHECKING:` blocks, and optionally define fallback `object` types for runtime if strict Pylint rules are enabled.
affects: all
Upgrade
Version history
1.43.5latest on PyPI · released May 6, 2026
Audit
Dependencies
boto3requiredProvides the AWS SDK for Python, which this library annotates. This stub library does not provide runtime functionality itself.
mypyoptionalStatic type checker used to validate type annotations.
Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
mypy-boto3-lexv2-models — pip install mypy-boto3-lexv2-models · libregistry