Registry / type-stubs / types-aiobotocore-bedrock-runtime

types-aiobotocore-bedrock-runtime

JSON →
library3.7.0pypypiunverified

Type annotations for `aiobotocore` BedrockRuntime service. This library provides static type checking for `aiobotocore` clients, resources, paginators, and service-specific `TypeDefs` and `Literals` for Amazon Bedrock Runtime. It is generated by `mypy-boto3-builder` and aims to be compatible with various IDEs and type checkers like mypy and pyright. The current version is 3.4.0 and it releases in sync with `aiobotocore` updates.

pip install types-aiobotocore-bedrock-runtime aiobotocore
INSTALL
IMPORT
SIG · TYPES-AIOBOTOCORE-
T
types-aiobotocore-bedrock-runtime
type-stubspythonv3.7.0
Install
7.6s avg
Import
1046ms
Disk
61MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v3.7.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.940 runs
installs and imports cleanly · install 0.0s · import 1.102s · 61MB
glibc
py 3.10–3.940 runs
installs and imports cleanly · install 7.6s · import 0.989s · 63MB
61MB installed
● package 61MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BedrockRuntimeClient
✓ from types_aiobotocore_bedrock_runtime.client import BedrockRuntimeClient
InvokeModelResponseTypeDef
✓ from types_aiobotocore_bedrock_runtime.type_defs import InvokeModelResponseTypeDef
AsyncInvokeStatusType
✓ from types_aiobotocore_bedrock_runtime.literals import AsyncInvokeStatusType

This example demonstrates how to use `aiobotocore` with the `types-aiobotocore-bedrock-runtime` stubs for type-checked asynchronous interaction with the Amazon Bedrock Runtime service. It explicitly types the client and a response, then invokes a model and streams its output. Note that `aiobotocore` itself must be installed alongside the type stubs.

import asyncio from typing import TYPE_CHECKING import aiobotocore.session if TYPE_CHECKING: from types_aiobotocore_bedrock_runtime.client import BedrockRuntimeClient from types_aiobotocore_bedrock_runtime.type_defs import InvokeModelResponseTypeDef async def main(): session = aiobotocore.session.get_session() async with session.create_client("bedrock-runtime") as client: client: BedrockRuntimeClient # Explicit type hint (optional, but good practice) response: InvokeModelResponseTypeDef = await client.invoke_model( modelId="anthropic.claude-3-sonnet-20240229-v1:0", contentType="application/json", accept="application/json", body=b'{"prompt": "Human: Hello, world!\nAssistant:"}' ) async with response["body"] as stream: payload = stream.iter_bytes() async for chunk in payload: print(chunk.decode()) if __name__ == "__main__": asyncio.run(main())
Debug
Known issues
breakingSupport for Python 3.8 has been removed. Users must upgrade to Python 3.9 or newer.
fix
Upgrade your Python environment to version 3.9 or higher.
affects: >=8.12.0 of mypy-boto3-builder generated packages (including types-aiobotocore-bedrock-runtime 3.4.0)
breakingTypeDef names for method arguments and conflicting names may have changed to be shorter or use different postfixes (e.g., `RequestRequestTypeDef` -> `RequestTypeDef`, `ExtraRequestTypeDef` -> `RequestExtraTypeDef`). This can break existing explicit type annotations.
fix
Update your code to reflect the new `TypeDef` naming conventions as indicated by your type checker.
affects: >=8.9.0 of mypy-boto3-builder generated packages
gotchaWhen using PyCharm, slow performance or high CPU usage might occur due to how it handles Literal overloads in type stubs. It's recommended to either use an external type checker like mypy/pyright or consider the '-lite' version of types-aiobotocore if available for less strict type checking in the IDE.
fix
Use mypy or pyright as your primary type checker, or consider `types-aiobotocore-lite` if performance is critical within PyCharm.
affects: All versions (due to PyCharm's internal type checker limitations)
gotchaPylint might report false positives about undefined variables when using type stubs with the `TYPE_CHECKING` flag. To resolve this, you might need to configure Pylint or explicitly set types to `object` in non-`TYPE_CHECKING` mode.
fix
Refer to the `types-aiobotocore` documentation for Pylint compatibility or configure Pylint to ignore these specific warnings.
affects: All versions
gotchaThis package provides *only* type annotations. The `aiobotocore` library itself (the runtime dependency) must be installed separately for your code to function.
fix
Ensure `aiobotocore` is installed in your environment alongside `types-aiobotocore-bedrock-runtime`.
affects: All versions
Upgrade
Version history
3.7.0latest on PyPI · released May 10, 2026
Audit
Dependencies
aiobotocorerequiredRuntime dependency for the AWS SDK client.
mypyoptionalA type checker to leverage the provided type annotations.
pyrightoptionalAn alternative type checker to leverage the provided type annotations.
Agent activity
33 hits · last 30 days
node
30
OpenAI (training)
2
Resources
types-aiobotocore-bedrock-runtime — pip install types-aiobotocore-bedrock-runtime · libregistry