{"id":3579,"library":"mypy-boto3-evs","title":"mypy-boto3-evs Type Stubs for Boto3 Elastic Volume Service (EVS)","description":"This package provides type annotations for the `boto3` AWS SDK, specifically for the Elastic Volume Service (EVS). It allows `mypy` to perform static type checking on your `boto3` code, catching potential errors before runtime. Part of the `mypy-boto3` ecosystem, it's frequently updated to align with `boto3` releases. The current version is 1.42.29, generated with `mypy-boto3-builder 8.12.0`.","status":"active","version":"1.42.29","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["mypy","boto3","aws","type-hinting","stubs","evs","elastic-volume-service"],"install":[{"cmd":"pip install mypy-boto3-evs boto3","lang":"bash","label":"Install stubs and boto3 runtime"}],"dependencies":[{"reason":"Runtime dependency for the AWS SDK for Python that these stubs type-check. Must be installed separately.","package":"boto3","optional":false}],"imports":[{"symbol":"EVSClient","correct":"from mypy_boto3_evs.client import EVSClient"},{"symbol":"DescribeVolumesResultTypeDef","correct":"from mypy_boto3_evs.type_defs import DescribeVolumesResultTypeDef"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_evs.client import EVSClient\nfrom mypy_boto3_evs.type_defs import DescribeVolumesResultTypeDef\n\n# Instantiate the EVS client with type hints\n# Ensure you have 'boto3' and 'mypy-boto3-evs' installed:\n# pip install boto3 mypy-boto3-evs\n\n# The actual boto3 client is created, but its type is now known to mypy\nevs_client: EVSClient = boto3.client(\"evs\", region_name=\"us-east-1\")\n\ntry:\n    # Call an EVS operation, result will be type-checked\n    response: DescribeVolumesResultTypeDef = evs_client.describe_volumes()\n\n    print(f\"Found {len(response.get('Volumes', []))} EVS volumes.\")\n\n    # Example of accessing typed data\n    for volume in response.get('Volumes', []):\n        print(f\"  - Volume ID: {volume.get('VolumeId')}, State: {volume.get('State')}\")\n\nexcept Exception as e:\n    print(f\"Error describing EVS volumes: {e}\")\n\n# To type-check this file, run: mypy your_script_name.py","lang":"python","description":"Demonstrates how to use `mypy-boto3-evs` to add type hints to your `boto3` EVS client and its operations. This example creates an EVS client, calls `describe_volumes`, and prints information about the found volumes. The `EVSClient` and `DescribeVolumesResultTypeDef` are imported directly from the `mypy-boto3-evs` package, enabling static analysis by `mypy`."},"warnings":[{"fix":"Upgrade your project's Python version to 3.9 or newer. If you must use Python 3.8, you will need to pin to older `mypy-boto3-evs` versions and potentially `mypy-boto3-builder`.","message":"The `mypy-boto3` builder (version 8.12.0) used to generate `mypy-boto3-evs` (version 1.42.29) has removed support for Python 3.8. Projects relying on these stubs must use Python 3.9 or newer.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0, mypy-boto3-evs >= 1.42.0"},{"fix":"Review `mypy` errors after upgrading and update references to `TypeDef` names in your code. Consult the `mypy-boto3` documentation for the correct generated names.","message":"Builder version 8.9.0 introduced breaking changes to `TypeDef` naming conventions (e.g., shorter names for packed method arguments, `Extra` postfix moved). If you have custom types or code relying on specific `TypeDef` names generated by older `mypy-boto3` versions, these names might have changed.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.9.0, mypy-boto3-evs >= 1.38.0"},{"fix":"Ensure `boto3` is included in your project's dependencies and installed alongside `mypy-boto3-evs`.","message":"This package provides only type stubs for `boto3` EVS. It does not install the `boto3` runtime itself. You must explicitly install `boto3` (e.g., `pip install boto3`) in your environment for your code to run.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Add `plugins = ['mypy_boto3.plugins.connectors']` to your `mypy.ini` (or equivalent `pyproject.toml` or `setup.cfg`) configuration file.","message":"For optimal type inference, especially when using `boto3.Session().client()` or `boto3.Session().resource()`, it is recommended to add the `mypy-boto3` plugin to your `mypy` configuration.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}