Registry / type-stubs / mypy-boto3-drs

mypy-boto3-drs

JSON →
library1.43.73pypypi✓ verified 22d ago

mypy-boto3-drs provides comprehensive type annotations for the AWS Disaster Recovery Service (DRS) client within the boto3 library. Version 1.42.86 is currently available, generated by mypy-boto3-builder 8.12.0. The project maintains an active release cadence, frequently updating stubs to align with new boto3 and botocore versions, ensuring compatibility with popular type checkers like mypy and pyright, as well as IDEs like VSCode and PyCharm.

pip install mypy-boto3-drs
INSTALL
IMPORT
SIG · MYPY-BOTO3-DRS
M
mypy-boto3-drs
type-stubspythonv1.43.73
Install
3.3s avg
Import
Disk
18MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.73 · 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.000s · 20MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 3.3s · import 0.000s · 21MB
18MB installed
● package 18MB
Code
Verified usage

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

DRSClient
from mypy_boto3_drs import DRSClient
from mypy_boto3_drs import DRSClient
Client
from mypy_boto3_drs import Client
ServiceResource
from mypy_boto3_drs import ServiceResource

This quickstart demonstrates how to initialize a typed DRS client using `mypy-boto3-drs` and `boto3`, and then perform a basic API call (`describe_recovery_instances`). It includes the recommended `TYPE_CHECKING` guard for conditional import of stubs and explicit type annotation for the client object.

from typing import TYPE_CHECKING import boto3 import os if TYPE_CHECKING: from mypy_boto3_drs import DRSClient from mypy_boto3_drs.type_defs import DescribeRecoveryInstancesResponseTypeDef # Configure AWS credentials and region, e.g., via environment variables or ~/.aws/credentials # For quickstart, ensure default session is configured or pass explicit creds/region. def get_drs_recovery_instances() -> None: # Explicitly type the client for mypy/IDE support client: DRSClient = boto3.client("drs", region_name=os.environ.get("AWS_REGION", "us-east-1")) try: # Example: Describe recovery instances response: DescribeRecoveryInstancesResponseTypeDef = client.describe_recovery_instances() print(f"Found {len(response['items'])} DRS Recovery Instances:") for instance in response['items']: print(f" - Instance ID: {instance.get('recoveryInstanceID')}, Status: {instance.get('lifeCycle', {}).get('status')}") except Exception as e: print(f"Error describing DRS recovery instances: {e}") if __name__ == "__main__": # Set dummy values for AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION if not configured os.environ.setdefault('AWS_ACCESS_KEY_ID', 'testing') os.environ.setdefault('AWS_SECRET_ACCESS_KEY', 'testing') os.environ.setdefault('AWS_REGION', 'us-east-1') get_drs_recovery_instances()
Debug
Known issues
breakingStarting with `mypy-boto3-builder` version 8.12.0 (which generated `mypy-boto3-drs 1.42.86`), support for Python 3.8 has been removed across all `mypy-boto3` packages.
fix
Upgrade your Python environment to 3.9 or higher. The `requires_python` metadata explicitly states `>=3.9`.
affects: mypy-boto3-drs >= 1.42.75.0 (corresponding to builder 8.12.0) and all newer versions.
breakingThe `mypy-boto3-builder` (version 8.9.0 and later, which includes 8.12.0 that generated this stub) introduced breaking changes to `TypeDef` naming conventions. Specifically, 'TypeDefs for packed method arguments use shorter names if possible' and 'Conflicting TypeDef Extra postfix moved to the end'.
fix
Review your code for any explicit imports or references to `TypeDef` names and update them according to the new naming conventions. Consult the `mypy-boto3` documentation for service-specific `type_defs`.
affects: mypy-boto3-drs packages generated by builder 8.9.0 or newer.
gotchaPyCharm users might experience slow performance and high CPU usage due to `Literal` overloads when using `boto3-stubs`. It is recommended to use `boto3-stubs-lite` (if explicit type annotations are acceptable) or disable PyCharm's internal type checker and rely on `mypy` or `pyright`.
fix
For PyCharm, consider `pip install boto3-stubs-lite[drs]` or configuring PyCharm to use an external type checker like `mypy` or `pyright`.
affects: All versions when used with PyCharm.
gotchaWhen using `TYPE_CHECKING` for conditional imports with Pylint, it might report 'undefined variable' errors for the aliased types in the runtime block. This is a known Pylint issue.
fix
To fix this, explicitly set the types to `object` in the non-`TYPE_CHECKING` block: `if TYPE_CHECKING: from mypy_boto3_drs import DRSClient else: DRSClient = object`.
affects: All versions when using `TYPE_CHECKING` with Pylint.
Upgrade
Version history
1.43.73latest on PyPI · released Aug 17, 2026
Audit
Dependencies
boto3requiredProvides the AWS SDK for Python that these type stubs annotate.
mypyoptionalPrimary type checker for which these stubs are designed.
pyrightoptionalAlternative type checker supported by these stubs.
Agent activity
19 hits · last 30 days
node
14
OpenAI (training)
2
Resources
mypy-boto3-drs — pip install mypy-boto3-drs · libregistry