{"library":"mypy-boto3-elasticache","title":"mypy-boto3-elasticache","description":"mypy-boto3-elasticache provides comprehensive type annotations for the `boto3` ElastiCache service. It enables static type checking with tools like MyPy for `boto3` users, improving code reliability and developer experience. The library is generated by `mypy-boto3-builder` and is updated frequently, often in sync with `boto3` releases and builder improvements. The current version is 1.42.81.","language":"python","status":"active","last_verified":"Thu May 14","install":{"commands":["pip install mypy-boto3-elasticache"],"cli":null},"imports":["from mypy_boto3_elasticache.client import ElastiCacheClient\nimport boto3\n\nclient: ElastiCacheClient = boto3.client('elasticache')","from mypy_boto3_elasticache.type_defs import DescribeCacheClustersResultTypeDef"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import boto3\nimport os\nfrom mypy_boto3_elasticache.client import ElastiCacheClient\nfrom mypy_boto3_elasticache.type_defs import DescribeCacheClustersResultTypeDef\n\n# mypy-boto3-elasticache provides type annotations for boto3. \n# The actual boto3 library handles runtime interactions.\n\naws_region = os.environ.get(\"AWS_REGION\", \"us-east-1\")\n\ntry:\n    # Initialize ElastiCache client with type annotation for improved type checking\n    client: ElastiCacheClient = boto3.client(\"elasticache\", region_name=aws_region)\n\n    # Example: Describe cache clusters\n    # The return type is automatically inferred by MyPy if stubs are installed,\n    # but can be explicitly annotated for clarity.\n    response: DescribeCacheClustersResultTypeDef = client.describe_cache_clusters()\n\n    print(f\"Successfully described {len(response.get('CacheClusters', []))} ElastiCache clusters.\")\n    for cluster in response.get('CacheClusters', []):\n        print(f\"  - {cluster['CacheClusterId']} ({cluster['Engine']})\")\n\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")\n    print(\"Ensure AWS credentials and region are configured (e.g., via environment variables or ~/.aws/credentials).\")\n","lang":"python","description":"This quickstart demonstrates how to use `mypy-boto3-elasticache` with `boto3`. The type stubs are automatically picked up by MyPy, allowing you to annotate your `boto3` client and response objects for better static analysis. Ensure your AWS credentials are configured for the `boto3` client to function.","tag":null,"tag_description":null,"last_tested":"2026-04-25","results":[{"runtime":"python:3.10-alpine","exit_code":1},{"runtime":"python:3.10-slim","exit_code":1},{"runtime":"python:3.11-alpine","exit_code":1},{"runtime":"python:3.11-slim","exit_code":1},{"runtime":"python:3.12-alpine","exit_code":1},{"runtime":"python:3.12-slim","exit_code":1},{"runtime":"python:3.13-alpine","exit_code":1},{"runtime":"python:3.13-slim","exit_code":1},{"runtime":"python:3.9-alpine","exit_code":1},{"runtime":"python:3.9-slim","exit_code":1}]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-14","installed_version":"1.43.0","pypi_latest":"1.43.0","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":50,"avg_install_s":1.7,"avg_import_s":null,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"mypy-boto3-elasticache","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"18.7M"},{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"mypy-boto3-elasticache","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"mypy-boto3-elasticache","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.8,"import_time_s":null,"mem_mb":null,"disk_size":"19M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"mypy-boto3-elasticache","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"mypy-boto3-elasticache","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"20.6M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"mypy-boto3-elasticache","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"mypy-boto3-elasticache","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.7,"import_time_s":null,"mem_mb":null,"disk_size":"21M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"mypy-boto3-elasticache","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"mypy-boto3-elasticache","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"12.1M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"mypy-boto3-elasticache","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"mypy-boto3-elasticache","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.5,"import_time_s":null,"mem_mb":null,"disk_size":"13M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"mypy-boto3-elasticache","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"mypy-boto3-elasticache","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"11.9M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"mypy-boto3-elasticache","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"mypy-boto3-elasticache","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.5,"import_time_s":null,"mem_mb":null,"disk_size":"12M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"mypy-boto3-elasticache","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"mypy-boto3-elasticache","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"18.2M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"mypy-boto3-elasticache","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"mypy-boto3-elasticache","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.9,"import_time_s":null,"mem_mb":null,"disk_size":"19M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"mypy-boto3-elasticache","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null}]}}