{"id":3089,"library":"mypy-boto3-fis","title":"mypy-boto3-fis","description":"mypy-boto3-fis provides comprehensive type annotations for the AWS FIS (Fault Injection Service) client in boto3. It is part of the `boto3-stubs` ecosystem, actively generated and maintained by `mypy-boto3-builder` (version 8.12.0), with frequent releases that align with boto3 updates to ensure up-to-date type checking capabilities for Python >=3.9.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["aws","boto3","mypy","type-hints","stubs","fis","static-analysis","cloud"],"install":[{"cmd":"pip install mypy-boto3-fis","lang":"bash","label":"Install service-specific stubs"},{"cmd":"pip install 'boto3-stubs[fis]'","lang":"bash","label":"Install via boto3-stubs extras"}],"dependencies":[{"reason":"Provides the AWS SDK for Python that these stubs type-check.","package":"boto3"},{"reason":"The static type checker that utilizes these annotations; not a runtime dependency of the stubs themselves.","package":"mypy","optional":true}],"imports":[{"note":"The actual boto3 client is dynamically typed; `FISClient` provides static type hints.","wrong":"from boto3.client import FISClient","symbol":"FISClient","correct":"from mypy_boto3_fis import FISClient"},{"note":"Provides type hints for paginator objects.","symbol":"ListExperimentTemplatesPaginator","correct":"from mypy_boto3_fis.paginator import ListExperimentTemplatesPaginator"},{"note":"Provides type hints for API request/response structures as TypedDicts.","symbol":"ActionParameterTypeDef","correct":"from mypy_boto3_fis.type_defs import ActionParameterTypeDef"},{"note":"Provides type hints for literal string values used in API calls.","symbol":"AccountTargetingType","correct":"from mypy_boto3_fis.literals import AccountTargetingType"}],"quickstart":{"code":"import boto3\nfrom typing import TYPE_CHECKING\n\nif TYPE_CHECKING:\n    from mypy_boto3_fis import FISClient\n    from mypy_boto3_fis.type_defs import ListExperimentsOutputTypeDef\n\n    # Example of a TypedDict for a specific request parameter\n    from mypy_boto3_fis.type_defs import ExperimentTemplateSummaryTypeDef\n\ndef list_fis_experiments() -> list['ExperimentTemplateSummaryTypeDef']:\n    client: FISClient = boto3.client('fis')\n    response: ListExperimentsOutputTypeDef = client.list_experiments()\n    return response.get('experimentSummaries', [])\n\n# Example usage (will not be type-checked at runtime by mypy-boto3-fis)\nif __name__ == \"__main__\":\n    try:\n        experiments = list_fis_experiments()\n        print(f\"Found {len(experiments)} FIS experiments.\")\n        for experiment in experiments:\n            print(f\" - {experiment.get('id')}: {experiment.get('state', {}).get('status')}\")\n    except Exception as e:\n        print(f\"Error listing FIS experiments: {e}\")","lang":"python","description":"This quickstart demonstrates how to obtain a type-hinted FIS client and use it to list experiments. Explicitly annotating the client type (`client: FISClient`) is often recommended for better IDE support and static analysis. It also shows importing and using a TypedDict for the response structure. The `TYPE_CHECKING` block ensures that stub imports are only used during type checking."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or newer.","message":"Support for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0, affecting all generated `mypy-boto3-*` packages. Ensure your projects use Python 3.9 or higher.","severity":"breaking","affected_versions":">=8.12.0 of mypy-boto3-builder (corresponding mypy-boto3-fis versions)"},{"fix":"Review your imports and usage of `TypeDef` objects and update their names according to the new conventions.","message":"TypeDef naming conventions changed in `mypy-boto3-builder` 8.9.0. Specifically, redundant `Request` postfixes were removed (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`), and `Extra` postfixes moved to the end of the name. This impacts imports and usage of generated TypeDefs.","severity":"breaking","affected_versions":">=8.9.0 of mypy-boto3-builder (corresponding mypy-boto3-fis versions)"},{"fix":"Add explicit type annotations when initializing boto3 clients, resources, paginators, and waiters.","message":"For optimal IDE autocomplete and `mypy` checks, explicitly type-annotate `boto3.client()` and `boto3.session.client()` calls with the imported client type (e.g., `client: FISClient = boto3.client('fis')`). While `mypy` often auto-discovers types, explicit hints provide the best experience across all tools.","severity":"gotcha","affected_versions":"All"},{"fix":"Install `mypy` (`pip install mypy`) and configure it (e.g., via `pyproject.toml` or `mypy.ini`) in your project.","message":"The `mypy-boto3-fis` package provides type stubs, but `mypy` itself (the static type checker) is not a dependency and must be installed and configured separately in your project.","severity":"gotcha","affected_versions":"All"},{"fix":"Wrap type stub imports within `if TYPE_CHECKING:` blocks and provide fallback `object` assignments for runtime compatibility.","message":"When integrating with tools like Pylint, it's recommended to guard stub imports using `if TYPE_CHECKING:` to avoid runtime dependencies in production, as Pylint might otherwise complain about undefined variables if the stubs are not present at runtime.","severity":"gotcha","affected_versions":"All"},{"fix":"For PyCharm users, consider `boto3-stubs-lite` if performance is an issue, or ensure you are on the latest PyCharm and Python versions for potential improvements.","message":"PyCharm has known performance issues with `Literal` overloads. If you experience slow performance, consider using the `boto3-stubs-lite` version (e.g., `pip install 'boto3-stubs-lite[fis]'`), which is more RAM-friendly but requires more explicit type annotations.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}