Registry / type-stubs / mypy-boto3-backup

mypy-boto3-backup

JSON →
library1.43.78pypypi✓ verified 23d ago

mypy-boto3-backup provides static type annotations for the AWS Backup 1.42.86 service, generated with mypy-boto3-builder 8.12.0. It enhances developer experience by offering type checking and auto-completion for `boto3` clients, resources, paginators, waiters, and specific type definitions for the Backup service, compatible with `mypy`, `pyright`, VSCode, and PyCharm.

pip install mypy-boto3-backup boto3
INSTALL
IMPORT
SIG · MYPY-BOTO3-BACKUP
M
mypy-boto3-backup
type-stubspythonv1.43.78
Install
5.7s avg
Import
684ms
Disk
52MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.78 · 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.704s · 53.9MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 5.7s · import 0.663s · 54MB
52MB installed
● package 52MB
Code
Verified usage

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

BackupClient
from mypy_boto3_backup.client import BackupClient
For explicit type annotation of the AWS Backup service client.
ListBackupPlansOutputTypeDef
from mypy_boto3_backup.type_defs import ListBackupPlansOutputTypeDef
For explicit type annotation of specific API response structures (TypedDicts).
AggregationPeriodType
from mypy_boto3_backup.literals import AggregationPeriodType
For explicit type annotation of service-specific literal values.

This quickstart demonstrates how to initialize a `boto3` Backup client and call an API method (`list_backup_plans`) with the benefit of type annotations from `mypy-boto3-backup`. It includes conditional imports to ensure type-checking dependencies are not present at runtime, a common pattern for stub packages.

import boto3 from typing import TYPE_CHECKING # These imports are only for type checking and won't be bundled in production if TYPE_CHECKING: from mypy_boto3_backup.client import BackupClient from mypy_boto3_backup.type_defs import ListBackupPlansOutputTypeDef def get_backup_plans() -> ListBackupPlansOutputTypeDef: """Lists AWS Backup plans and returns the response.""" # Type annotation for the client for better IDE support and mypy checking client: BackupClient = boto3.client("backup") response = client.list_backup_plans( MaxResults=5, # Example parameter # Add other filters or parameters as needed ) return response if __name__ == "__main__": try: backup_plans = get_backup_plans() print(f"Successfully retrieved {len(backup_plans.get('BackupPlansList', []))} backup plans.") for plan in backup_plans.get('BackupPlansList', [])[:2]: # Print first 2 for brevity print(f" - Plan ID: {plan.get('BackupPlanId')}, Name: {plan.get('BackupPlanName')}") except Exception as e: print(f"Error listing backup plans: {e}")
Debug
Known issues
breakingAs of `mypy-boto3-builder` 8.12.0 (which generates `mypy-boto3-backup` versions 1.42.x and later), support for Python 3.8 has been removed. Projects using these stubs must target Python 3.9 or newer.
fix
Upgrade your Python environment to 3.9 or a newer version, or pin `mypy-boto3-backup` to a version compatible with Python 3.8 (e.g., <1.42.0).
affects: mypy-boto3-builder >=8.12.0, mypy-boto3-backup >=1.42.x
breakingStarting with `mypy-boto3-builder` 8.12.0, all `mypy-boto3` packages migrated to PEP 561. This change affects how type checkers (like `mypy`) discover and use type information, potentially requiring updates to `mypy` configurations or environment setups if issues arise.
fix
Ensure `mypy` is up-to-date and correctly configured to find installed PEP 561 compatible stub packages. In most cases, `mypy` should automatically find them if installed in the same environment.
affects: mypy-boto3-builder >=8.12.0, mypy-boto3-backup >=1.42.x
breakingVersion 8.9.0 of `mypy-boto3-builder` introduced breaking changes to how TypeDef names are generated. Specifically, argument TypeDefs were shortened (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`), and conflicting `Extra` postfixes were moved (e.g., `CreateDistributionExtraRequestTypeDef` to `CreateDistributionRequestExtraTypeDef`). While the example refers to other services, this naming convention change may apply to other service-specific TypeDefs.
fix
Review and update explicit TypeDef imports and usage in your codebase to reflect the new naming conventions. Consult the specific `mypy-boto3-backup` documentation or generated stubs for exact new names.
affects: mypy-boto3-builder >=8.9.0, mypy-boto3-backup >=1.38.x (approx)
gotchaIf you were previously using the monolithic `mypy-boto3` package, note that `mypy-boto3-builder` 8.9.0 moved the 'legacy' `mypy-boto3` to a separate product. This means you should now install `boto3-stubs` (with service extras) or specific `mypy-boto3-service` packages like `mypy-boto3-backup`.
fix
Migrate your `pip install` commands to use `boto3-stubs` with service extras (e.g., `pip install 'boto3-stubs[backup]'`) or install standalone service stubs (e.g., `pip install mypy-boto3-backup`).
affects: mypy-boto3-builder >=8.9.0, mypy-boto3-backup >=1.38.x (approx)
gotchaWhen using standalone `mypy-boto3-backup` (or `boto3-stubs-lite[backup]`), explicit type annotations for `boto3.client` and `boto3.resource` calls are recommended for optimal type checking and auto-completion, as these packages may not provide overloads for `session.client`/`resource`.
fix
Always explicitly annotate your `boto3` client or resource objects, e.g., `client: BackupClient = boto3.client("backup")`.
affects: All versions
Upgrade
Version history
1.43.78latest on PyPI · released Aug 21, 2026
Audit
Dependencies
boto3requiredProvides the underlying AWS SDK for Python that these stubs annotate.
mypyrequiredThe primary static type checker for which these stubs are designed.
typing-extensionsrequiredRequired for advanced type system features, especially for Python versions older than 3.9, though it's often a dependency for modern type hints.
Agent activity
27 hits · last 30 days
node
24
OpenAI (training)
2
Resources
mypy-boto3-backup — pip install mypy-boto3-backup · libregistry