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 mypyVerified import paths — ran on the pinned version, not inferred.
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.
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`).
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.
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`).
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.