types-aiobotocore-bedrock
raw JSON → 3.5.0 verified Mon Apr 27 auth: no python
Type annotations for aiobotocore Bedrock service, generated by mypy-boto3-builder. Version 3.5.0 requires Python >=3.9 and provides static typing support for the Bedrock client. Released as part of the mypy_boto3_builder ecosystem.
pip install types-aiobotocore-bedrock Common errors
error ModuleNotFoundError: No module named 'types_aiobotocore_bedrock' ↓
cause Package not installed or wrong Python environment.
fix
Run pip install types-aiobotocore-bedrock in your active environment.
error cannot import name 'BedrockClient' from 'types_aiobotocore_bedrock' ↓
cause Incorrect import path or package version mismatch.
fix
Use from types_aiobotocore_bedrock import BedrockClient; check that package version matches aiobotocore.
Warnings
breaking Python 3.8 support removed in v3.5.0 (mypy-boto3-builder 8.12.0). Upgrade to Python >=3.9. ↓
fix Use Python 3.9+ or pin to types-aiobotocore-bedrock==3.4.0.
gotcha These are type stubs only; runtime type checking is not provided. They must be used with aiobotocore installed. ↓
fix Install aiobotocore with bedrock extra: pip install aiobotocore[bedrock].
deprecated TypeDef naming changed in mypy-boto3-builder 8.9.0: e.g., ListFoundationModelsRequestRequestTypeDef became ListFoundationModelsRequestTypeDef. May break existing type alias references. ↓
fix Update type references to shorter names. Check your usage of *RequestTypeDef, *OutputTypeDef.
Imports
- BedrockClient
from types_aiobotocore_bedrock import BedrockClient
Quickstart
import asyncio
from types_aiobotocore_bedrock import BedrockClient
from aiobotocore.session import get_session
async def main():
session = get_session()
async with session.create_client('bedrock', region_name='us-east-1') as client:
# client is type-annotated as BedrockClient
response = await client.list_foundation_models()
print(response)
asyncio.run(main())