Registry / type-stubs / mypy-boto3-storagegateway

mypy-boto3-storagegateway

JSON →
library1.43.0pypypi✓ verified 23d ago

mypy-boto3-storagegateway provides type annotations for the AWS Boto3 StorageGateway service. It helps developers write type-safe Python code that interacts with StorageGateway by providing static type hints for clients, resources, and data structures. The library is generated by `mypy-boto3-builder` and is updated frequently, often daily or weekly, to keep pace with new `boto3` releases and AWS API changes, ensuring up-to-date type definitions.

pip install mypy-boto3-storagegateway
INSTALL
IMPORT
SIG · MYPY-BOTO3-STORAGE
M
mypy-boto3-storagegateway
type-stubspythonv1.43.0
Install
3.5s 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.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.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.5s · import 0.000s · 21MB
18MB installed
● package 18MB
Code
Verified usage

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

StorageGatewayClient
from mypy_boto3_storagegateway import StorageGatewayClient
from mypy_boto3_storagegateway import StorageGatewayClient

Demonstrates how to obtain a type-hinted StorageGateway client using `boto3` and leverage the provided stubs for static analysis, including type-hinted method calls and response objects. It includes error handling for a runnable example.

import boto3 from mypy_boto3_storagegateway import StorageGatewayClient from mypy_boto3_storagegateway.type_defs import ListGatewaysOutputTypeDef def get_storagegateway_client() -> StorageGatewayClient: """Returns a typed StorageGateway client.""" # boto3.client will automatically pick up the type hints # if mypy-boto3-storagegateway is installed. return boto3.client("storagegateway") # Get a type-hinted StorageGateway client client: StorageGatewayClient = get_storagegateway_client() try: # Use the client with type-hinted response response: ListGatewaysOutputTypeDef = client.list_gateways(Limit=10) gateway_names = [g['GatewayARN'] for g in response.get('GatewayInfos', [])] if gateway_names: print(f"Found gateways: {', '.join(gateway_names)}") else: print("No gateways found.") except Exception as e: print(f"An error occurred: {e}") # For authentication, ensure AWS credentials are configured (e.g., via environment variables, ~/.aws/credentials, or IAM roles) # This quickstart assumes default credential setup.
Debug
Known issues
breakingSupport for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0. If you are using `mypy-boto3-storagegateway` version 1.42.3 or newer, your projects must use Python 3.9 or higher for type checking.
fix
Upgrade your Python environment to 3.9 or newer. Alternatively, pin an older `mypy-boto3-storagegateway` version if Python 3.8 compatibility is critical, but this will mean using older API definitions.
affects: mypy-boto3-builder >= 8.12.0 (corresponding `mypy-boto3-storagegateway` >= 1.42.3)
breakingIn `mypy-boto3-builder` version 8.9.0, there were breaking changes to TypeDef naming conventions, specifically for packed method arguments, shortening names (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). This can cause type errors if updating from significantly older versions of the stubs.
fix
Review your code for TypeDef names, especially those ending with 'RequestRequestTypeDef', and update them to the shorter forms. Consult the specific service's `type_defs.pyi` for current names.
affects: mypy-boto3-builder >= 8.9.0
gotchaFor optimal type checking accuracy, ensure the `mypy-boto3-storagegateway` version you install closely matches your `boto3` library version. Significant mismatches can lead to incorrect type hints or missing definitions, especially with new service features or API changes.
fix
Keep `mypy-boto3-storagegateway` and `boto3` updated, ideally aligning their major/minor versions. Using `boto3-stubs[storagegateway]` from `pip install boto3-stubs[storagegateway]` can help manage this by ensuring the correct `boto3` dependency for the stubs is also satisfied.
affects: All versions
gotchaThese packages provide static type annotations for `boto3`; they do not replace `boto3` itself. You must have `boto3` installed to actually run your code against AWS services.
fix
Ensure `boto3` is installed in your runtime environment alongside `mypy-boto3-storagegateway`. The latter is only for `mypy` or other static analysis tools.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredRequired at runtime for interacting with AWS services; these are type stubs for boto3.
mypyoptionalRequired for static type checking to utilize these stubs.
Agent activity
27 hits · last 30 days
node
22
Amazon
1
OpenAI (training)
1
Resources
mypy-boto3-storagegateway — pip install mypy-boto3-storagegateway · libregistry