{"id":3124,"library":"mypy-boto3-quicksight","title":"mypy-boto3-quicksight Type Stubs","description":"mypy-boto3-quicksight provides static type annotations for the boto3 QuickSight service, generated by mypy-boto3-builder. It enhances development with type-checking capabilities for QuickSight operations. The library is actively maintained with frequent updates, often aligning with new boto3 releases and builder improvements. Current version is 1.42.80.","status":"active","version":"1.42.80","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["aws","boto3","mypy","type-hints","quick-sight","stubs"],"install":[{"cmd":"pip install mypy-boto3-quicksight","lang":"bash","label":"Install only QuickSight stubs"},{"cmd":"pip install 'boto3-stubs[quicksight]'","lang":"bash","label":"Install boto3-stubs with QuickSight extra"}],"dependencies":[{"reason":"Provides the actual AWS SDK runtime functionality; these are only type stubs.","package":"boto3","optional":false},{"reason":"Requires Python 3.9 or newer for compatibility with recent stub versions.","package":"python","optional":false,"version_constraint":">=3.9"}],"imports":[{"symbol":"QuickSightClient","correct":"from mypy_boto3_quicksight.client import QuickSightClient"},{"note":"Used for resource-level abstractions, though less common for QuickSight.","symbol":"QuickSightServiceResource","correct":"from mypy_boto3_quicksight.service_resource import QuickSightServiceResource"},{"note":"Commonly used for type-hinting API call responses, e.g., for `list_dashboards`.","symbol":"ListDashboardsOutputTypeDef","correct":"from mypy_boto3_quicksight.type_defs import ListDashboardsOutputTypeDef"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_quicksight.client import QuickSightClient\nfrom typing import TYPE_CHECKING\nimport os\n\n# Ensure boto3 is installed for runtime functionality\n# pip install boto3 mypy-boto3-quicksight\n\nif TYPE_CHECKING:\n    # Type-hint the boto3 client for QuickSight\n    client: QuickSightClient = boto3.client(\"quicksight\")\nelse:\n    client = boto3.client(\"quicksight\")\n\n# Example: List dashboards (requires AWS credentials configured)\ntry:\n    print(\"Attempting to list QuickSight dashboards...\")\n    # Replace '123456789012' with your actual AWS Account ID or set AWS_ACCOUNT_ID env var.\n    aws_account_id = os.environ.get('AWS_ACCOUNT_ID', '123456789012')\n    \n    response = client.list_dashboards(\n        AwsAccountId=aws_account_id\n    )\n    dashboards = response.get(\"DashboardSummaryList\", [])\n    if dashboards:\n        print(f\"Found {len(dashboards)} dashboards. First dashboard name: {dashboards[0].get('Name')}\")\n    else:\n        print(f\"No dashboards found for AWS Account ID: {aws_account_id}, or the ID is invalid.\")\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")\n\nprint(\"QuickSight client setup with type hints successful.\")","lang":"python","description":"Demonstrates how to import and use `QuickSightClient` to type-hint a `boto3` QuickSight client. This enables static analysis tools like MyPy to validate your QuickSight API calls. For the code to execute successfully, ensure your AWS credentials are configured and replace `AWS_ACCOUNT_ID` with a real value from your environment or directly in the code."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or later. If upgrading is not possible, pin an older version of `mypy-boto3-quicksight` that supported Python 3.8.","message":"Python 3.8 support was removed with `mypy-boto3-builder` version 8.12.0. If you are using Python 3.8, you must upgrade to Python 3.9 or newer to use the latest versions of these type stubs.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.12.0, corresponding `mypy-boto3-quicksight` versions (1.42.80 and later)"},{"fix":"Ensure `boto3` is installed in your environment alongside `mypy-boto3-quicksight`: `pip install boto3`.","message":"This package provides only type stubs ('.pyi' files) for `boto3`. It does not include the actual `boto3` library or its runtime functionality. You must install `boto3` separately for your code to run.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Review your explicit `TypeDef` imports and adjust names according to the updated stub definitions. Typically, redundant suffixes like `RequestRequest` or `Extra` were simplified or repositioned.","message":"The `mypy-boto3-builder` (version 8.9.0) introduced changes to how `TypeDef` names are generated, specifically shortening verbose names (e.g., `*RequestRequestTypeDef` to `*RequestTypeDef`). If your code directly imports specific `TypeDef`s, their names may have changed.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.9.0, corresponding `mypy-boto3-quicksight` versions"},{"fix":"Verify that your `mypy` setup is current. Usually, no specific `MYPYPATH` or similar configuration is needed for PEP 561 stubs. If issues arise, consult `mypy` documentation for package discovery and ensure your `mypy` version is also up-to-date.","message":"The builder migrated to PEP 561 compliant packages in version 8.12.0. While this generally improves compatibility with type checkers by making stubs discoverable automatically, ensure your `mypy` configuration (e.g., `pyproject.toml`) is not relying on outdated, non-standard stub discovery mechanisms.","severity":"gotcha","affected_versions":"mypy-boto3-builder >=8.12.0, corresponding `mypy-boto3-quicksight` versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}