Registry / type-stubs / mypy-boto3-backupsearch

mypy-boto3-backupsearch

JSON →
library1.43.0pypypi✓ verified 22d ago

mypy-boto3-backupsearch provides type annotations for the `boto3` AWS BackupSearch service (version 1.42.3), generated by the `mypy-boto3-builder` (version 8.12.0). It enhances static type checking and IDE auto-completion for `boto3` client and resource operations, addressing the dynamic nature of `boto3` to improve code quality and prevent runtime errors. The library follows the release cadence of `boto3` and `botocore` services.

pip install mypy-boto3-backupsearch boto3 mypy
INSTALL
IMPORT
SIG · MYPY-BOTO3-BACKUPS
M
mypy-boto3-backupsearch
type-stubspythonv1.43.0
Install
5.7s avg
Import
572ms
Disk
114MB
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.95 runs
installs and imports cleanly · install 0.0s · import 0.594s · 116.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 5.7s · import 0.550s · 114MB
114MB installed
● package 114MB
Code
Verified usage

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

BackupSearchClient
from mypy_boto3_backupsearch.client import BackupSearchClient
Imports the specific client type stub for BackupSearch.
Session
from boto3.session import Session
Standard boto3 session import, used for creating clients.
BackupCreationTimeFilterOutputTypeDef
from mypy_boto3_backupsearch.type_defs import BackupCreationTimeFilterOutputTypeDef
Imports a generated TypedDict for service response structures.

This quickstart demonstrates how to initialize a `boto3` BackupSearch client and apply explicit type annotations using `mypy-boto3-backupsearch` for enhanced static analysis. It also shows an example of using a generated `TypedDict` for response structures. The `TYPE_CHECKING` block ensures these type hints are only present during static analysis and do not add runtime dependencies.

import boto3 from typing import TYPE_CHECKING if TYPE_CHECKING: from mypy_boto3_backupsearch.client import BackupSearchClient session = boto3.session.Session() # Explicit type annotation for the client client: "BackupSearchClient" = session.client("backupsearch", region_name="us-east-1") # Example of a client method call (type-hinted) response = client.list_search_jobs() print(f"Listed BackupSearch Jobs: {len(response.get('SearchJobs', []))}") # Example with a TypedDict for a more complex response part if TYPE_CHECKING: from mypy_boto3_backupsearch.type_defs import SearchJobTypeDef jobs: list["SearchJobTypeDef"] = response.get('SearchJobs', []) if jobs: print(f"First job ID: {jobs[0].get('BackupVaultName')}")
Debug
Known issues
breakingSupport for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0. Users on Python 3.8 will need to upgrade their Python version to 3.9 or higher. `mypy` itself also no longer supports Python 3.8.
fix
Upgrade your Python environment to 3.9 or newer.
affects: mypy-boto3-builder >= 8.12.0, mypy-boto3-backupsearch >= 1.42.0
breakingAs of `mypy-boto3-builder` 8.12.0, packages migrated to PEP 561, using `py.typed` marker files. This might affect how type checkers discover and interpret the stubs in certain environments or older toolchains.
fix
Ensure your `mypy` and environment are up-to-date and correctly configured to find PEP 561-compliant stub packages. This is typically handled automatically by modern `pip` and `mypy` versions.
affects: mypy-boto3-builder >= 8.12.0, mypy-boto3-backupsearch >= 1.42.0
breakingIn `mypy-boto3-builder` 8.9.0, there were breaking changes to `TypeDef` naming conventions (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). While this example is not for BackupSearch, similar renames might apply to BackupSearch `TypeDefs`.
fix
Review your code for any explicit imports or usage of `TypeDef` names and adjust them according to the latest documentation or error messages from `mypy`.
affects: mypy-boto3-builder >= 8.9.0, mypy-boto3-backupsearch >= 1.39.0
gotchaThis package provides *only* type annotations. The actual `boto3` library is a mandatory runtime dependency and must be installed separately to execute any AWS API calls.
fix
Always install `boto3` alongside `mypy-boto3-backupsearch`: `pip install boto3 mypy-boto3-backupsearch`.
affects: All
gotchaThe `mypy-boto3` stub versions are typically aligned with `boto3` versions. Using a stub package version that significantly deviates from your installed `boto3` runtime version can lead to type mismatches or incorrect hints.
fix
Keep `mypy-boto3-backupsearch` and `boto3` versions as closely matched as possible. For best compatibility, install `mypy-boto3-builder` and generate stubs locally tied to your exact `boto3` version.
affects: All
gotchaFor compatibility with `pylint` and to avoid unnecessary runtime dependencies, it is recommended to conditionally import type hints using `if TYPE_CHECKING:`.
fix
Wrap type hint imports with `from typing import TYPE_CHECKING` and `if TYPE_CHECKING:` blocks.
affects: All
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredThis package provides type stubs for the runtime library `boto3` for the BackupSearch service; `boto3` itself must be installed to use the service functionality.
mypyoptionalThis package provides type stubs for static type checking; `mypy` is the primary tool used to perform this checking.
Agent activity
31 hits · last 30 days
node
28
OpenAI (training)
1
Resources
mypy-boto3-backupsearch — pip install mypy-boto3-backupsearch · libregistry