Registry / type-stubs / mypy-boto3-bedrock-agent

mypy-boto3-bedrock-agent

JSON →
library1.43.83pypypi✓ verified 28d ago

mypy-boto3-bedrock-agent provides type annotations (stubs) for the `boto3` Bedrock Agent service, enhancing static type checking with tools like Mypy. It is part of the `mypy-boto3` ecosystem, which generates stubs for all `boto3` services. The library follows the `boto3` release cycle closely, with frequent updates to ensure compatibility with the latest AWS SDK features and API changes. Current version is 1.42.83.

pip install mypy-boto3-bedrock-agent boto3
INSTALL
IMPORT
SIG · MYPY-BOTO3-BEDROCK
M
mypy-boto3-bedrock-agent
type-stubspythonv1.43.83
Install
3.8s avg
Import
—
Disk
51MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v1.43.83 · 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.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 52.4MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 3.8s · import 0.000s · 53MB
51MB installed
● package 51MB
Code
Verified usage

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

BedrockAgentClient
✓ from mypy_boto3_bedrock_agent import BedrockAgentClient
BedrockAgentClient
✓ from mypy_boto3_bedrock_agent.client import BedrockAgentClient
Both import paths are typically valid, the first is often preferred for brevity.

This quickstart demonstrates how to instantiate a `bedrock-agent` client with type hints from `mypy-boto3-bedrock-agent` and perform a basic operation (`list_agents`). It highlights how the stubs provide static type checking for `boto3` client methods and their responses.

import os import boto3 from mypy_boto3_bedrock_agent import BedrockAgentClient from botocore.exceptions import ClientError # Ensure boto3 is installed and configured (e.g., via AWS environment variables # AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, or IAM roles). # For local testing, ensure these are set or provide dummy values. # Type hint the client to enable static analysis by Mypy # region_name is typically required for Bedrock services. client: BedrockAgentClient = boto3.client( "bedrock-agent", region_name=os.environ.get("AWS_REGION", "us-east-1") ) try: # Example operation: List existing agents print("Attempting to list Bedrock Agents...") response = client.list_agents(maxResults=5) agents = response.get("agentSummaries", []) if agents: print("Successfully listed agents:") for agent_summary in agents: print(f" - Agent ID: {agent_summary['agentId']}, Name: {agent_summary['agentName']}") else: print("No Bedrock agents found in this region.") except ClientError as e: error_code = e.response.get("Error", {}).get("Code") error_message = e.response.get("Error", {}).get("Message") if error_code == "AccessDeniedException": print(f"Access Denied: You might not have permissions to list agents. Error: {error_message}") else: print(f"An AWS Client Error occurred: {error_code} - {error_message}") except Exception as e: print(f"An unexpected error occurred: {e}") # Mypy will now correctly type-check method calls on `client` # and the structure of `response` based on the AWS API definition.
Debug
Known issues
breakingSupport for Python 3.8 has been removed. Projects using `mypy-boto3-bedrock-agent` (and other `mypy-boto3` generated stubs) must use Python 3.9 or newer.
fix
Upgrade your Python environment to 3.9 or a later version.
affects: >=8.12.0 of mypy-boto3-builder (corresponds to mypy-boto3-bedrock-agent >=1.42.83)
breakingTypeDef naming conventions were changed in `mypy-boto3-builder`, potentially affecting direct references to generated TypeDefs. For example, `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef` and `CreateDistributionExtraRequestTypeDef` became `CreateDistributionRequestExtraTypeDef`.
fix
Review your code for any direct references to `boto3` TypeDefs and adjust their names according to the new conventions. Refer to the specific service's `TypeDefs` for updated names.
affects: >=8.9.0 of mypy-boto3-builder (corresponds to mypy-boto3-bedrock-agent versions after approximately 1.30.x)
gotchaThis package provides *only* type annotations (stubs). `boto3` itself must be installed and available at runtime for your application to function correctly.
fix
Ensure `boto3` is included in your project's dependencies (e.g., `pip install boto3`).
affects: All versions
gotchaInstalling `mypy-boto3-bedrock-agent` only provides stubs for the `bedrock-agent` service. If you use other `boto3` services (e.g., S3, EC2), you will need to install their respective `mypy-boto3-*` packages, or install the overarching `boto3-stubs` package for full coverage.
fix
Install `boto3-stubs` (or `mypy-boto3` for legacy projects) for comprehensive `boto3` type checking, or install specific `mypy-boto3-{service_name}` packages for each service you use.
affects: All versions
Upgrade
Version history
1.43.83latest on PyPI · released Aug 28, 2026
Audit
Dependencies
boto3requiredProvides the runtime functionality for AWS SDK. This package only provides type stubs.
Agent activity
17 hits · last 30 days
node
14
OpenAI (training)
1
Resources
mypy-boto3-bedrock-agent — pip install mypy-boto3-bedrock-agent · libregistry