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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.582s · 51.9MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.8s · import 0.572s · 52MB
50MB installed
● package 50MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
DLMClient
✓ from mypy_boto3_dlm import DLMClient
✗ from mypy_boto3_dlm.client import DLMClient
The client class is directly importable from the top-level package for convenience.
This example demonstrates how to import and use the `DLMClient` type for static analysis. The `if TYPE_CHECKING:` block ensures that the import is only active during type checking, avoiding potential runtime overhead or issues if stubs are not present in the production environment. Replace `policy-0123456789abcdef0` with an actual DLM policy ID for a successful response.
import boto3
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from mypy_boto3_dlm import DLMClient
# Instantiate the boto3 client with type hints
client: DLMClient = boto3.client("dlm", region_name="us-east-1")
# Example usage with type-checked methods and arguments
try:
response = client.get_lifecycle_policies(
PolicyIds=["policy-0123456789abcdef0"]
)
print("Successfully retrieved DLM policies:", response["Policies"])
except client.exceptions.ResourceNotFoundException as e:
print(f"Policy not found: {e}")
except Exception as e:
print(f"An error occurred: {e}")
Debug
Known issues
breakingStarting with `mypy-boto3-builder` version 8.12.0 (which generates `mypy-boto3-dlm` versions like 1.42.84), support for Python 3.8 has been removed across all `mypy-boto3` packages. Projects must use Python 3.9 or newer.fixUpgrade your project's Python version to 3.9 or higher.
affects: mypy-boto3-builder >= 8.12.0
breakingType definition (TypeDef) naming conventions underwent breaking changes in `mypy-boto3-builder` version 8.9.0. If you were directly referencing generated TypeDefs by their full names (e.g., in custom code generation or by relying on old names), your code might break.fixReview your code for direct references to TypeDef names and update them according to the new naming conventions (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). Refer to the `mypy-boto3-builder` release notes for details.
affects: mypy-boto3-builder >= 8.9.0
gotchaThe `mypy-boto3-dlm` package provides only type annotations. You must also install the `boto3` library itself for your code to function at runtime.fixEnsure both `boto3` and `mypy-boto3-dlm` are installed: `pip install boto3 mypy-boto3-dlm`.
affects: All versions
gotchaUsers of PyCharm might experience slow performance or high CPU usage due to PyCharm's handling of `Literal` overloads in `mypy-boto3` packages. This is a known PyCharm issue (PY-40997).fixConsider using `boto3-stubs-lite` (if available for DLM) which offers a more RAM-friendly version with fewer overloads, or disable PyCharm's internal type checker and rely on `mypy` or `pyright`.
affects: All versions with PyCharm < 2023.3
gotchaPylint can sometimes report `undefined-variable` warnings when `mypy-boto3` imports are only used within `if TYPE_CHECKING:` blocks. This is because Pylint may not correctly interpret these type-checking-only imports at runtime.fixUse a pattern like `if TYPE_CHECKING: from mypy_boto3_dlm import DLMClient else: DLMClient = object` or add Pylint comments to suppress specific warnings (e.g., `# pylint: disable=unused-import`).
affects: All versions when using Pylint
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredProvides the actual AWS SDK functionality that these stubs annotate.