Registry /
type-stubs / mypy-boto3-savingsplans
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.593s · 117.9MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 7.7s · import 0.560s · 116MB
115MB installed
● package 115MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
SavingsPlansClient
✓ from mypy_boto3_savingsplans.client import SavingsPlansClient
✗ from boto3.client import SavingsPlansClient
Type stubs are provided by `mypy-boto3-savingsplans`, not directly from `boto3` or its `client` module.
This example demonstrates how to explicitly type a `boto3` SavingsPlans client using `mypy-boto3-savingsplans` for improved static analysis and IDE auto-completion. It then calls a sample API method.
import boto3
from boto3.session import Session
from mypy_boto3_savingsplans.client import SavingsPlansClient
from typing import TYPE_CHECKING
# Ensure AWS credentials are configured (e.g., via environment variables, ~/.aws/credentials)
# For example, using environment variables for demonstration:
# import os
# os.environ['AWS_ACCESS_KEY_ID'] = os.environ.get('AWS_ACCESS_KEY_ID', 'YOUR_ACCESS_KEY')
# os.environ['AWS_SECRET_ACCESS_KEY'] = os.environ.get('AWS_SECRET_ACCESS_KEY', 'YOUR_SECRET_KEY')
# os.environ['AWS_REGION'] = os.environ.get('AWS_REGION', 'us-east-1')
# Recommended: Explicitly type the client for full IDE support and static analysis
if TYPE_CHECKING:
client: SavingsPlansClient = Session().client('savingsplans')
else:
client = Session().client('savingsplans')
# Example usage with type-checked methods
try:
response = client.describe_savings_plans(maxResults=10)
print("Successfully described Savings Plans:")
for sp in response.get('savingsPlans', []):
print(f" - {sp.get('savingsPlanArn')}")
except client.exceptions.ClientError as e:
print(f"Error describing Savings Plans: {e}")
Debug
Known issues
breakingSupport for Python 3.8 was removed starting with `mypy-boto3-builder` version 8.12.0. Ensure your project uses Python 3.9 or higher for compatibility.fixUpgrade your Python environment to 3.9 or newer. The `mypy-boto3-savingsplans` package itself requires `Python >=3.9`.
affects: mypy-boto3-builder >= 8.12.0 (affects all generated stubs)
breakingAll `mypy-boto3` packages, including `mypy-boto3-savingsplans`, migrated to PEP 561 compatible packages with `mypy-boto3-builder` 8.12.0. This changes how type checkers discover stubs.fixFor most modern `mypy` and IDE setups, stubs should be automatically discovered. Ensure `mypy` is configured to find installed packages (`--no-site-packages` should NOT be used). In some cases, installing the umbrella `boto3-stubs` package might be preferred (`pip install 'boto3-stubs[savingsplans]'`).
affects: mypy-boto3-builder >= 8.12.0 (affects all generated stubs)
gotchaFor optimal IDE auto-completion and static type checking, explicitly type your `boto3` client instance using the imported `SavingsPlansClient` type, especially when using `boto3.session.Session().client(...)`.fixInstead of `client = boto3.client('savingsplans')`, use `from mypy_boto3_savingsplans.client import SavingsPlansClient; client: SavingsPlansClient = boto3.client('savingsplans')`. affects: All versions
breakingTypeDef naming conventions were changed in `mypy-boto3-builder` 8.9.0. This could affect code that directly references generated `TypedDict` names (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`).fixReview your code for direct references to `TypeDef` names and adjust them according to the new naming conventions if they clash with changes. Consult the changelog for specific service updates.
affects: mypy-boto3-builder >= 8.9.0 (affects all generated stubs)
gotchaThe `mypy-boto3` ecosystem offers individual service packages (e.g., `mypy-boto3-savingsplans`) and an umbrella `boto3-stubs` package with extras (e.g., `boto3-stubs[savingsplans]`). Choose the installation method that best suits your project's dependency management.fixBoth methods provide the same type-checking benefits. `boto3-stubs` with extras is often simpler for multiple services, while individual packages can be lighter for single-service projects. Avoid installing both for the same service to prevent conflicts.
affects: All versions
gotchaMypy itself has evolving Python version support. While `mypy-boto3-savingsplans` requires Python 3.9+, ensure your `mypy` version is compatible with your target Python runtime.fixRegularly update `mypy` to its latest version to maintain compatibility with new Python features and `typeshed` updates. Check `mypy`'s release notes for its current Python support matrix.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredRuntime dependency for AWS SDK functionality.
mypyrequiredStatic type checker to leverage the annotations.
typing-extensionsoptionalRequired for certain type features on older Python versions, though usually installed transitively.