{"id":3108,"library":"mypy-boto3-kinesisanalytics","title":"mypy-boto3-kinesisanalytics Type Stubs","description":"mypy-boto3-kinesisanalytics provides explicit type annotations for the `boto3` KinesisAnalytics service. It is currently at version 1.42.3 and is part of the `mypy-boto3-builder` project, which frequently releases updates to synchronize with `boto3` releases and improve type-checking capabilities.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["mypy","boto3","aws","type-hints","kinesisanalytics","stubs","static-analysis"],"install":[{"cmd":"pip install mypy-boto3-kinesisanalytics boto3","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"This package provides type stubs for the actual boto3 library, which must be installed for runtime AWS interactions.","package":"boto3"},{"reason":"mypy is the primary static type checker that utilizes these type stubs.","package":"mypy"}],"imports":[{"symbol":"KinesisAnalyticsClient","correct":"from mypy_boto3_kinesisanalytics.client import KinesisAnalyticsClient"},{"note":"Import specific TypedDicts for request/response payloads.","symbol":"ApplicationSummaryTypeDef","correct":"from mypy_boto3_kinesisanalytics.type_defs import ApplicationSummaryTypeDef"},{"note":"Import literal types for string-based enums.","symbol":"ApplicationStatusType","correct":"from mypy_boto3_kinesisanalytics.literals import ApplicationStatusType"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_kinesisanalytics.client import KinesisAnalyticsClient\nfrom typing import TYPE_CHECKING\n\n# The actual boto3 client is untyped by default\nclient = boto3.client('kinesisanalytics')\n\n# For type checking, assert the client type if not using session.client overloads\n# Most modern IDEs and mypy should infer correctly if boto3-stubs is installed,\n# but explicit typing ensures maximum compatibility and clarity.\nif TYPE_CHECKING:\n    kinesisanalytics_client: KinesisAnalyticsClient = client\nelse:\n    kinesisanalytics_client = client\n\ntry:\n    # Example: List Kinesis Analytics applications\n    response = kinesisanalytics_client.list_applications()\n    print(f\"Found {len(response.get('ApplicationSummaries', []))} Kinesis Analytics applications:\")\n    for app in response.get('ApplicationSummaries', []):\n        print(f\"  - Name: {app['ApplicationName']}, Status: {app['ApplicationStatus']}\")\nexcept Exception as e:\n    print(f\"Error listing applications: {e}\")","lang":"python","description":"Demonstrates how to obtain a typed KinesisAnalytics client and use it to list applications, leveraging the type hints provided by `mypy-boto3-kinesisanalytics`."},"warnings":[{"fix":"Upgrade to Python 3.9 or newer, or pin `mypy-boto3-kinesisanalytics` to a version compatible with Python 3.8.","message":"Python 3.8 support was removed for all `mypy-boto3` packages, including `mypy-boto3-kinesisanalytics`, starting with `mypy-boto3-builder` version 8.12.0. Users on Python 3.8 will need to use an older version of the stubs or upgrade their Python interpreter.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.12.0"},{"fix":"Review and update imports of any explicitly used TypedDicts from the `type_defs` module to match the new naming conventions.","message":"TypeDef naming conventions changed in `mypy-boto3-builder` version 8.9.0. This affects how generated TypedDicts are named, for example, `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef` and `CreateDistributionExtraRequestTypeDef` became `CreateDistributionRequestExtraTypeDef`. This may break explicit imports of these TypedDicts.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.9.0"},{"fix":"Ensure `boto3` is installed alongside `mypy-boto3-kinesisanalytics` (e.g., `pip install boto3 mypy-boto3-kinesisanalytics`).","message":"The `mypy-boto3-kinesisanalytics` package only provides type annotations. The `boto3` library itself must be installed and available in your environment for the code to run and interact with AWS services.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Install `mypy-boto3-kinesisanalytics` with the same major.minor.patch version as your `boto3` installation (e.g., `boto3==1.42.3` and `mypy-boto3-kinesisanalytics==1.42.3`).","message":"To ensure accurate type checking, it's crucial to keep your `boto3` and `mypy-boto3-kinesisanalytics` versions synchronized. Mismatched versions can lead to incorrect type hints or missed errors.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Verify that your `mypy` configuration (e.g., `pyproject.toml`, `mypy.ini`) is correctly set up to discover PEP 561-compliant packages. Most default setups should handle this automatically.","message":"As of `mypy-boto3-builder` version 8.12.0, all packages migrated to PEP 561. This means packages now include a `py.typed` file. While this generally improves type discovery, specific configurations for `mypy` or IDEs might need adjustments if issues arise with stub discovery.","severity":"gotcha","affected_versions":"mypy-boto3-builder >=8.12.0"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}