types-aiobotocore-elasticache
raw JSON → 3.5.0 verified Mon Apr 27 auth: no python
Type annotations for aiobotocore ElastiCache 3.5.0 service generated with mypy-boto3-builder. Provides static type checking support for ElastiCache operations when using aiobotocore. Version 3.5.0, part of the types-aiobotocore ecosystem, updated monthly.
pip install types-aiobotocore-elasticache Common errors
error ModuleNotFoundError: No module named 'types_aiobotocore_elasticache' ↓
cause Package not installed or misspelled.
fix
Run: pip install types-aiobotocore-elasticache
error ImportError: cannot import name 'ElastiCacheClient' from 'types_aiobotocore_elasticache' ↓
cause Incorrect import path; the client class is nested under service module.
fix
Use: from types_aiobotocore_elasticache import ElastiCacheClient
Warnings
breaking Version 8.9.0 of mypy-boto3-builder introduced breaking changes: TypeDef names shortened and conflicts resolved (e.g., CreateDistributionRequestRequestTypeDef -> CreateDistributionRequestTypeDef). Ensure your type annotations match the new naming. ↓
fix Update your type references accordingly or pin to older builder version if needed.
breaking Python 3.8 support was dropped in builder 8.12.0. This package requires Python >=3.9. ↓
fix Upgrade to Python 3.9+ or use an older version of types-aiobotocore-elasticache (pre-8.12.0 builder).
deprecated The sms-voice service (not elasticache) was deprecated and replaced. For elasticache, no deprecation yet, but aiobotocore may remove services in future. ↓
fix Monitor aiobotocore changelog for ElastiCache service deprecation.
gotcha The package name includes '-elasticache' but it's for ElastiCache (one 'c'). Ensure you install the correct package. ↓
fix Install via 'pip install types-aiobotocore-elasticache' with correct spelling.
Imports
- ElastiCacheClient wrong
from aiobotocore.client import ElastiCacheClientcorrectfrom types_aiobotocore_elasticache import ElastiCacheClient - ElastiCacheServiceResource wrong
from aiobotocore.resources import ElastiCacheServiceResourcecorrectfrom types_aiobotocore_elasticache import ElastiCacheServiceResource - ElastiCacheWaiter wrong
from aiobotocore.waiters import ElastiCacheWaitercorrectfrom types_aiobotocore_elasticache.waiters import ElastiCacheWaiter
Quickstart
import asyncio
from types_aiobotocore_elasticache import ElastiCacheClient
async def main():
session = aiobotocore.session.AioSession()
async with session.create_client('elasticache', region_name='us-east-1') as client:
# client is type-annotated as ElastiCacheClient
response = await client.describe_cache_clusters()
print(response['CacheClusters'])
asyncio.run(main())