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
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.9MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 3.3s · import 0.000s · 20MB
18MB installed
● package 18MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
GlacierClient
✓ from mypy_boto3_glacier import GlacierClient
✗ from mypy_boto3_glacier import GlacierClient
This quickstart demonstrates how to obtain a type-hinted Glacier client using `mypy-boto3-glacier` and perform a basic operation like creating a vault. Explicit type annotations on `boto3.client` calls enable full type checking and IDE autocomplete.
import boto3
from mypy_boto3_glacier.client import GlacierClient
from mypy_boto3_glacier.type_defs import CreateVaultOutputTypeDef
import os
def get_glacier_client() -> GlacierClient:
# Using explicit type annotation for better IDE support and static analysis
client: GlacierClient = boto3.client(
"glacier",
region_name=os.environ.get('AWS_REGION', 'us-east-1'),
aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID', ''),
aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY', '')
)
return client
def create_glacier_vault(client: GlacierClient, vault_name: str) -> CreateVaultOutputTypeDef:
response: CreateVaultOutputTypeDef = client.create_vault(vaultName=vault_name)
return response
if __name__ == '__main__':
glacier_client = get_glacier_client()
# Example of type-hinted usage
try:
vault_info = create_glacier_vault(glacier_client, "my-typed-vault")
print(f"Vault created: {vault_info.get('location')}")
except glacier_client.exceptions.ResourceAlreadyExistsException:
print("Vault already exists.")
except Exception as e:
print(f"An error occurred: {e}")
Debug
Known issues
breakingSupport for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0. Projects using Python 3.8 will need to upgrade their Python version or pin `mypy-boto3-glacier` to a version prior to 8.12.0.fixUpgrade Python to 3.9+ or pin `mypy-boto3-glacier` to `<1.42.0` (or the last version compatible with builder <8.12.0).
affects: >=8.12.0 (builder), affects all generated packages including mypy-boto3-glacier
breakingThe project migrated to PEP 561 packages in `mypy-boto3-builder` version 8.12.0. This change improves how type checkers like mypy discover and utilize stub files, but might require updates to custom build scripts or environments not adhering to standard package installation practices.fixEnsure `mypy` is configured to find site-packages. For non-standard setups, verify that type checkers can locate the `py.typed` marker file or explicitly configure `MYPYPATH` if necessary (though stub-only packages prefer installation).
affects: >=8.12.0 (builder), affects all generated packages
breakingStarting with `mypy-boto3-builder` 8.9.0, there were breaking changes in how TypeDefs for packed method arguments are named, e.g., `CreateDistributionRequestRequestTypeDef` was shortened to `CreateDistributionRequestTypeDef`. While the example is for another service, this change affects all generated `TypeDef`s across services.fixReview and update `TypeDef` imports and usage in your code to reflect the new, shorter naming conventions after upgrading.
affects: >=8.9.0 (builder), affects all generated packages
gotchaWhen using `mypy-boto3-glacier` or `boto3-stubs`, it is often necessary to explicitly annotate the return type of `boto3.client()` calls (e.g., `client: GlacierClient = boto3.client(...)`) for optimal IDE autocomplete and static analysis, especially in VSCode.fixAlways use explicit type annotations for `boto3.client` and `boto3.resource` assignments. (e.g., `client: GlacierClient = session.client("glacier")`). affects: All versions
gotchaThe `mypy-boto3` project (the original name) was moved to a separate product and is no longer generated alongside `boto3-stubs` since `mypy-boto3-builder` 8.9.0. Users upgrading from very old `mypy-boto3` installations might need to switch to `boto3-stubs` or `mypy-boto3-glacier` directly.fixMigrate from `mypy-boto3` to `boto3-stubs` or individual service stubs like `mypy-boto3-glacier` for current compatibility and features.
affects: Versions before 8.9.0 for `mypy-boto3`
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredProvides the underlying AWS SDK for Python, which these stubs type-annotate.
typing-extensionsoptionalMay be implicitly required for full type-hinting compatibility on Python versions older than 3.9, due to the migration to `collections.abc` with fallbacks.