types-aiobotocore-batch
raw JSON → 3.5.0 verified Mon Apr 27 auth: no python
Type annotations for aiobotocore Batch 3.5.0 service, generated with mypy-boto3-builder 8.12.0. Provides static typing for AWS Batch operations via aiobotocore. Current version is 3.5.0, released as part of mypy_boto3_builder releases.
pip install types-aiobotocore-batch Common errors
error ModuleNotFoundError: No module named 'types-aiobotocore-batch' ↓
cause Attempting to import using the package name with hyphens instead of underscores.
fix
Use
import types_aiobotocore_batch (underscores). error AttributeError: module 'types_aiobotocore_batch' has no attribute 'BatchClient' ↓
cause The package may not be installed or the client class is not in the top-level namespace.
fix
Ensure you have installed the package (
pip install types-aiobotocore-batch). Then import using from types_aiobotocore_batch import BatchClient. Warnings
breaking Version 8.9.0 of mypy_boto3_builder introduced a breaking change: TypeDefs for packed method arguments now use shorter names (e.g., CreateDistributionRequestRequestTypeDef -> CreateDistributionRequestTypeDef). This may cause type-checking errors if you were using the longer names. ↓
fix Update your type annotations to use the new shorter TypeDef names.
deprecated This package provides type stubs for aiobotocore Batch. The underlying service documentation may mark some operations as deprecated. Always check the official AWS Batch documentation for deprecation notices. ↓
fix Consult AWS Batch API reference for current status.
gotcha The import path for the client is from `types_aiobotocore_batch` (with underscore), not `types-aiobotocore-batch` (hyphen). Using the hyphenated name in an import will cause ModuleNotFoundError. ↓
fix Use `types_aiobotocore_batch` (underscores) in import statements.
Imports
- BatchClient wrong
from types_aiobotocore_batch.client import BatchClientcorrectfrom types_aiobotocore_batch import BatchClient
Quickstart
import asyncio
from types_aiobotocore_batch import BatchClient
from aiobotocore.session import get_session
async def main():
session = get_session()
async with session.create_client('batch', region_name='us-east-1') as client:
response = await client.describe_compute_environments()
print(response)
asyncio.run(main())