Registry / type-stubs / mypy-boto3-docdb-elastic

mypy-boto3-docdb-elastic

JSON →
library1.43.0pypypi✓ verified 22d ago

mypy-boto3-docdb-elastic provides type annotations for the boto3 DocDBElastic service. It ensures static type checking with tools like MyPy, offering improved code quality and developer experience for AWS DocumentDB Elastic Clusters interactions. The current version is 1.42.3, generated with mypy-boto3-builder 8.12.0, and new versions are released in sync with boto3 updates.

pip install mypy-boto3-docdb-elastic boto3 mypy
INSTALL
IMPORT
SIG · MYPY-BOTO3-DOCDB-E
M
mypy-boto3-docdb-elastic
type-stubspythonv1.43.0
Install
7.5s avg
Import
568ms
Disk
115MB
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.910 runs
installs and imports cleanly · install 0.0s · import 0.592s · 117.9MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 7.5s · import 0.543s · 116MB
115MB installed
● package 115MB
Code
Verified usage

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

DocDBElasticClient
from mypy_boto3_docdb_elastic import DocDBElasticClient
ListClustersPaginator
from mypy_boto3_docdb_elastic.paginators import ListClustersPaginator
ApplyMethodType
from mypy_boto3_docdb_elastic.literals import ApplyMethodType
ClusterListTypeDef
from mypy_boto3_docdb_elastic.type_defs import ClusterListTypeDef
from mypy_boto3_docdb_elastic.type_defs import ListClustersOutputTypeDef
Type definition names can change between major builder versions, verify against the specific package documentation for your version.

This quickstart demonstrates how to instantiate a boto3 DocDBElastic client and use it with mypy-boto3-docdb-elastic for type annotations. The `TYPE_CHECKING` block ensures type hints are only active during static analysis, avoiding runtime dependency if desired. It includes error handling for common issues like AccessDeniedException.

import boto3 from mypy_boto3_docdb_elastic import DocDBElasticClient from typing import TYPE_CHECKING # Ensure AWS credentials are configured (e.g., via environment variables or ~/.aws/credentials) # For local execution, you might mock credentials or ensure they're available. # For example, using environment variables: # os.environ['AWS_ACCESS_KEY_ID'] = 'YOUR_ACCESS_KEY' # os.environ['AWS_SECRET_ACCESS_KEY'] = 'YOUR_SECRET_KEY' # os.environ['AWS_REGION'] = 'us-east-1' if TYPE_CHECKING: client: DocDBElasticClient = boto3.client('docdb-elastic') else: client = boto3.client('docdb-elastic') try: # Example: List DocumentDB Elastic clusters response = client.list_clusters( maxResults=10 ) print(f"Successfully listed {len(response.get('Clusters', []))} clusters.") for cluster in response.get('Clusters', []): print(f" Cluster ARN: {cluster.get('ClusterArn')}, Status: {cluster.get('Status')}") except client.exceptions.AccessDeniedException as e: print(f"Authentication or authorization error: {e}") except Exception as e: print(f"An unexpected error occurred: {e}")
Debug
Known issues
breakingStarting with mypy-boto3-builder 8.12.0 (which generated this stub), Python 3.8 support has been removed for all packages. Ensure your project uses Python 3.9 or higher.
fix
Upgrade your Python environment to 3.9 or newer.
affects: mypy-boto3-builder >=8.12.0, mypy-boto3-docdb-elastic >=1.42.3
breakingmypy-boto3-builder 8.9.0 introduced breaking changes to TypeDef naming conventions, potentially causing `NameError` or incorrect type resolution for previously used type definitions. Shorter names for packed method arguments and postfix changes for conflicting TypeDefs are common.
fix
Consult the specific package documentation or generated `type_defs.pyi` for the correct TypeDef names in your version of mypy-boto3-docdb-elastic.
affects: mypy-boto3-builder >=8.9.0, mypy-boto3-docdb-elastic versions generated with builder >=8.9.0
gotchaWhen using `if TYPE_CHECKING:` for conditional imports to avoid runtime dependencies, Pylint might report 'undefined variable' errors.
fix
Assign `object` to the conditionally imported types in the `else` block (e.g., `else: DocDBElasticClient = object`) or configure Pylint to ignore these specific warnings.
affects: All versions when using conditional imports with Pylint
gotchaThe `mypy-boto3-*` packages are closely tied to `boto3` versions. To ensure accurate type hints, the version of `mypy-boto3-docdb-elastic` should ideally align with your installed `boto3` version.
fix
Install `boto3-stubs[docdb-elastic]` to ensure synchronized versions with `boto3`, or manually verify `mypy-boto3-docdb-elastic` and `boto3` versions are compatible.
affects: All versions
gotchaPyCharm users might experience slow performance with Literal overloads.
fix
Consider using `boto3-stubs-lite[docdb-elastic]` (which is more RAM-friendly but requires explicit type annotations) or disabling PyCharm's internal type checker and relying on external tools like `mypy` or `pyright`.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredRuntime library for AWS SDK interactions, type annotations are provided for it.
mypyrequiredStatic type checker that consumes these type annotations.
Agent activity
19 hits · last 30 days
node
14
Amazon
2
OpenAI (training)
2
Resources
mypy-boto3-docdb-elastic — pip install mypy-boto3-docdb-elastic · libregistry