Registry / type-stubs / mypy-boto3-backup-gateway

mypy-boto3-backup-gateway

JSON →
library1.43.55pypypi✓ verified 27d ago

mypy-boto3-backup-gateway provides high-quality type annotations for the boto3 BackupGateway service, ensuring better code completion, static analysis, and error detection in development environments. It is part of the larger `mypy-boto3` ecosystem, generated by `mypy-boto3-builder`. The current version is 1.42.58, and it is frequently updated to align with `boto3` releases and schema changes.

pip install mypy-boto3-backup-gateway
INSTALL
IMPORT
SIG · MYPY-BOTO3-BACKUP-
M
mypy-boto3-backup-gateway
type-stubspythonv1.43.55
Install
1.6s avg
Import
—
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v1.43.55 · 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.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.3MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage

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

BackupGatewayClient
✓ from mypy_boto3_backup_gateway import BackupGatewayClient
✗ from mypy_boto3_backup_gateway import BackupGatewayClient

This quickstart demonstrates how to initialize a `BackupGatewayClient` with type hints and use a basic operation like `list_gateways`. The `mypy-boto3-backup-gateway` package provides the necessary type definitions for the client and its responses, enabling static type checking with tools like MyPy.

import boto3 from boto3.session import Session from mypy_boto3_backup_gateway.client import BackupGatewayClient from mypy_boto3_backup_gateway.type_defs import ListGatewaysOutputTypeDef def get_backup_gateway_client() -> BackupGatewayClient: """Initializes and returns a type-hinted BackupGateway client.""" # A real application would configure AWS credentials via environment variables or ~/.aws/credentials session = Session(region_name='us-east-1') client: BackupGatewayClient = session.client('backup-gateway') return client def list_all_gateways() -> ListGatewaysOutputTypeDef: """Lists all Backup Gateways and returns the typed response.""" client = get_backup_gateway_client() response: ListGatewaysOutputTypeDef = client.list_gateways() print(f"Found {len(response['Gateways'])} gateways.") return response if __name__ == '__main__': gateways_data = list_all_gateways() # Mypy will now correctly infer types for gateways_data, e.g., gateways_data['Gateways'] # without needing runtime checks. for gateway in gateways_data.get('Gateways', []): print(f"Gateway ARN: {gateway['GatewayArn']}, Name: {gateway['GatewayDisplayName']}")
Debug
Known issues
breakingSupport for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0. All `mypy-boto3` packages, including `mypy-boto3-backup-gateway`, now require Python 3.9 or newer.
fix
Upgrade your Python environment to 3.9 or a newer supported version.
affects: >=8.12.0 (builder), >=1.42.x (package)
breakingThe `mypy-boto3` ecosystem migrated to PEP 561-compliant packaging in `mypy-boto3-builder` version 8.12.0. This might require updating older type checker configurations or virtual environments to correctly discover stubs, though it generally improves compatibility with modern tooling.
fix
Ensure your `mypy` or `pyright` setup is up-to-date and correctly configured to find installed stub packages. In most cases, a standard `pip install` should work, but older or custom setups might need adjustment.
affects: >=8.12.0 (builder), >=1.42.x (package)
breakingIn `mypy-boto3-builder` version 8.9.0, certain TypeDef names were refactored for clarity and consistency. Specifically, TypeDefs for packed method arguments use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`) and conflicting `Extra` postfixes were moved to the end (e.g., `CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`).
fix
Review your code for any custom `TypeDef` imports and update the names according to the new conventions.
affects: >=8.9.0 (builder), corresponding package versions
gotchaWhile `mypy-boto3` strives for implicit type inference, some IDEs (like VSCode with older Python extensions or PyCharm) may still benefit from explicit type annotations for `boto3.client` and `session.client` calls to provide optimal auto-completion and type checking. For example, `client: BackupGatewayClient = session.client('backup-gateway')`.
fix
Explicitly add type annotations to your `boto3` client and resource assignments for improved IDE experience.
affects: All versions
Upgrade
Version history
1.43.55latest on PyPI · released Jul 23, 2026
Audit
Dependencies
boto3requiredThis package provides type annotations for boto3; boto3 itself must be installed to use the annotated AWS SDK client.
Agent activity
20 hits · last 30 days
node
18
OpenAI (training)
1
Resources
mypy-boto3-backup-gateway — pip install mypy-boto3-backup-gateway · libregistry