types-aiobotocore-eks

raw JSON →
3.5.0 verified Mon Apr 27 auth: no python

Type annotations for aiobotocore EKS service, dynamically generated by mypy-boto3-builder. Current version 3.5.0, updated regularly to match latest AWS SDK.

pip install types-aiobotocore-eks
error ModuleNotFoundError: No module named 'types_aiobotocore_eks'
cause Package not installed, or installed under a different Python environment.
fix
Run pip install types-aiobotocore-eks in the correct environment.
error Import error: cannot import name 'EKSClient' from 'aiobotocore.client'
cause Wrong import path; EKSClient class is only available from types-aiobotocore-eks.
fix
Use from types_aiobotocore_eks import EKSClient instead.
breaking Version 8.9.0 changed TypeDef naming: `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`. This may break code using older names.
fix Update TypeDef imports to match new naming convention.
breaking Removed support for Python 3.8 starting from version 8.12.0.
fix Upgrade to Python 3.9 or later.
gotcha The package provides *type annotations only* at runtime; you must also install `aiobotocore` and `boto3` for actual functionality.
fix Install `aiobotocore` and optionally `boto3` alongside.

List EKS clusters using typed aiobotocore client.

import os
import asyncio
from types_aiobotocore_eks import EKSClient
from aiobotocore.session import get_session

async def list_clusters() -> None:
    session = get_session()
    async with session.create_client('eks', region_name='us-west-2') as client:
        resp = await client.list_clusters()
        print(resp['clusters'])

asyncio.run(list_clusters())