{"library":"mypy-boto3-lexv2-models","title":"Type Annotations for boto3 LexModelsV2","description":"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.","language":"python","status":"active","last_verified":"Thu May 14","install":{"commands":["pip install mypy-boto3-lexv2-models boto3"],"cli":null},"imports":["from mypy_boto3_lexv2_models import LexModelsV2Client","from mypy_boto3_lexv2_models.client import LexModelsV2Client","from mypy_boto3_lexv2_models.paginator import ListBotsPaginator","from mypy_boto3_lexv2_models.waiter import BotLocaleBuiltWaiter","from mypy_boto3_lexv2_models.type_defs import BotSummaryTypeDef","from mypy_boto3_lexv2_models.literals import BotStatusType"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import boto3\nfrom typing import TYPE_CHECKING\nimport os\n\nif TYPE_CHECKING:\n    from mypy_boto3_lexv2_models import LexModelsV2Client\n    from mypy_boto3_lexv2_models.type_defs import BotSummaryTypeDef\n\ndef get_lexv2_client() -> 'LexModelsV2Client':\n    \"\"\"Returns a type-hinted LexModelsV2 client.\"\"\"\n    # Ensure AWS credentials are set up (e.g., via environment variables or ~/.aws/credentials)\n    # Using os.environ.get for demonstration purposes in a runnable quickstart.\n    # In a real application, boto3 will find credentials automatically.\n    if not os.environ.get('AWS_ACCESS_KEY_ID'):\n        print(\"Warning: AWS_ACCESS_KEY_ID not set. This example may fail without credentials.\")\n\n    return boto3.client(\"lexv2\")\n\ndef list_all_lex_bots():\n    client = get_lexv2_client()\n    print(\"Listing Lex V2 bots...\")\n    try:\n        response = client.list_bots(sortBy={\n            'attribute': 'BotName',\n            'order': 'Ascending'\n        })\n        bots: list['BotSummaryTypeDef'] = response['botSummaries']\n        if bots:\n            for bot in bots:\n                print(f\"  Bot Name: {bot['botName']}, Status: {bot['botStatus']}\")\n        else:\n            print(\"  No Lex V2 bots found.\")\n    except Exception as e:\n        print(f\"Error listing bots: {e}\")\n\nif __name__ == \"__main__\":\n    list_all_lex_bots()","lang":"python","description":"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.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-14","installed_version":"1.43.5","pypi_latest":"1.43.5","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":3.8,"avg_import_s":0.83,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"mypy-boto3-lexv2-models","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.76,"mem_mb":15.9,"disk_size":"51.7M"},{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"mypy-boto3-lexv2-models","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.71,"mem_mb":15.8,"disk_size":"51.6M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"mypy-boto3-lexv2-models","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":4.1,"import_time_s":0.5,"mem_mb":15.9,"disk_size":"52M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"mypy-boto3-lexv2-models","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.69,"mem_mb":15.8,"disk_size":"52M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"mypy-boto3-lexv2-models","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":1.15,"mem_mb":17.7,"disk_size":"54.8M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"mypy-boto3-lexv2-models","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":1.29,"mem_mb":17.5,"disk_size":"54.7M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"mypy-boto3-lexv2-models","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3.9,"import_time_s":0.96,"mem_mb":17.7,"disk_size":"55M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"mypy-boto3-lexv2-models","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":1.02,"mem_mb":17.5,"disk_size":"55M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"mypy-boto3-lexv2-models","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.83,"mem_mb":16.6,"disk_size":"46.0M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"mypy-boto3-lexv2-models","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.92,"mem_mb":16.5,"disk_size":"45.9M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"mypy-boto3-lexv2-models","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3.3,"import_time_s":0.83,"mem_mb":16.6,"disk_size":"47M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"mypy-boto3-lexv2-models","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.87,"mem_mb":16.5,"disk_size":"46M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"mypy-boto3-lexv2-models","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.78,"mem_mb":18,"disk_size":"45.8M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"mypy-boto3-lexv2-models","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.87,"mem_mb":17.8,"disk_size":"45.5M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"mypy-boto3-lexv2-models","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3,"import_time_s":0.88,"mem_mb":17.9,"disk_size":"46M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"mypy-boto3-lexv2-models","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":1.12,"mem_mb":17.8,"disk_size":"46M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"mypy-boto3-lexv2-models","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.58,"mem_mb":14.9,"disk_size":"51.1M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"mypy-boto3-lexv2-models","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.67,"mem_mb":14.8,"disk_size":"51.1M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"mypy-boto3-lexv2-models","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":4.6,"import_time_s":0.49,"mem_mb":14.9,"disk_size":"52M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"mypy-boto3-lexv2-models","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.66,"mem_mb":14.8,"disk_size":"52M"}]}}