Registry / type-stubs / mypy-boto3-docdb

mypy-boto3-docdb

JSON →
library1.43.0pypypi✓ verified 23d ago

This library provides type annotations for the AWS DocDB (DocumentDB) service client when using boto3. Generated with mypy-boto3-builder 8.12.0, `mypy-boto3-docdb` (current version 1.42.3) enhances static analysis, provides auto-completion in IDEs, and helps catch type-related errors before runtime. It releases in sync with boto3 versions.

pip install boto3 mypy-boto3-docdb mypy
INSTALL
IMPORT
SIG · MYPY-BOTO3-DOCDB
M
mypy-boto3-docdb
type-stubspythonv1.43.0
Install
6.2s avg
Import
626ms
Disk
114MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.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.103.95 runs
installs and imports cleanly · install 0.0s · import 0.646s · 116.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 6.2s · import 0.606s · 114MB
114MB installed
● package 114MB
Code
Verified usage

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

DocDBClient
from mypy_boto3_docdb.client import DocDBClient
This is the type hint for the DocDB client returned by `boto3.client('docdb')`.
DescribeDBInstancesResponseTypeDef
from mypy_boto3_docdb.type_defs import DescribeDBInstancesResponseTypeDef
Import TypedDicts for specific API call responses to enable precise type checking of return values.

This example demonstrates how to use `mypy-boto3-docdb` for type hinting a `boto3` DocDB client. It explicitly imports `DocDBClient` and `DescribeDBInstancesResponseTypeDef` under a `TYPE_CHECKING` guard, ensuring they are only used during static analysis and do not add runtime dependencies. The `boto3.client('docdb')` call is type-hinted, enabling autocompletion and type validation for DocDB-specific methods and their responses.

from typing import TYPE_CHECKING import boto3 if TYPE_CHECKING: from mypy_boto3_docdb.client import DocDBClient from mypy_boto3_docdb.type_defs import DescribeDBInstancesResponseTypeDef def get_docdb_instances() -> "DescribeDBInstancesResponseTypeDef": # The type hint 'DocDBClient' is picked up by mypy and IDEs. # At runtime, you still get the regular boto3 client. client: DocDBClient = boto3.client("docdb") response = client.describe_db_instances() print(f"Found {len(response['DBInstances'])} DocDB instances.") return response if __name__ == "__main__": # This example requires AWS credentials configured (e.g., via AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY # or ~/.aws/credentials) to run successfully against a real AWS account. try: instances_data = get_docdb_instances() # Further processing with type-checked 'instances_data' except Exception as e: print(f"Error describing DocDB instances: {e}")
Debug
Known issues
breakingSupport for Python 3.8 has been removed across all packages generated by `mypy-boto3-builder`, including `mypy-boto3-docdb` versions 8.12.0 and above.
fix
Upgrade your Python environment to 3.9 or higher. If you must use Python 3.8, pin `mypy-boto3-docdb` to a version older than 8.12.0 (e.g., `<8.12.0`).
affects: 8.12.0+
breaking`mypy-boto3` packages migrated to PEP 561. While this improves how type checkers find stubs, it might affect complex build setups or older type checker versions.
fix
Ensure your type checker (e.g., Mypy) is updated to a recent version that fully supports PEP 561. Standard `pip install` usage should generally be unaffected.
affects: 8.12.0+
gotcha`mypy-boto3-docdb` provides *only* type stubs. It does not include the `boto3` runtime library itself. Your application still requires `boto3` to be installed and available at runtime.
fix
Install `boto3` (e.g., `pip install boto3`) as a runtime dependency and `mypy-boto3-docdb` as a development dependency (e.g., `pip install mypy-boto3-docdb`).
affects: All versions
breakingTypeDef names for method arguments may have been shortened (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). This can break existing explicit type annotations.
fix
Update your type annotations to reflect the new, shorter TypeDef names for method arguments as per the latest stub definitions. Refer to the specific `mypy-boto3-docdb` documentation for updated names.
affects: 8.9.0+
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredRuntime dependency for the AWS SDK for Python. `mypy-boto3-docdb` provides type hints for this library, but does not replace it.
mypyoptionalRequired to perform static type checking with the provided stubs.
Agent activity
24 hits · last 30 days
node
20
OpenAI (training)
1
Resources
mypy-boto3-docdb — pip install mypy-boto3-docdb · libregistry