Install & Compatibility
Where this runs
tested against v1.43.15 · 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.95 runs
installs and imports cleanly · install 0.0s · import 0.608s · 116.6MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 6.0s · import 0.558s · 114MB
114MB installed
● package 114MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
BudgetsClient
✓ from mypy_boto3_budgets import BudgetsClient
This is the primary way to get the type-hinted client for the Budgets service.
BudgetsServiceName
✓ from mypy_boto3_budgets.literals import BudgetsServiceName
Literal types for service names are useful for precise type checking of client creation.
BudgetTypeDef
✓ from mypy_boto3_budgets.type_defs import BudgetTypeDef
Type definitions for service response objects and request parameters.
This quickstart demonstrates how to import and use the `BudgetsClient` type annotation with a `boto3` client. It shows how to correctly type-hint a client and then use it with a common operation like `describe_budgets`, benefiting from autocompletion and static type checking. Replace '123456789012' with a valid AWS account ID or use `os.environ.get` for programmatic access.
import boto3
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from mypy_boto3_budgets import BudgetsClient
from mypy_boto3_budgets.type_defs import DescribeBudgetsOutputTypeDef
# Initialize a boto3 session and client
session = boto3.session.Session()
client: BudgetsClient = session.client("budgets")
# Example usage with type-hinted client
try:
response: DescribeBudgetsOutputTypeDef = client.describe_budgets(AccountId="123456789012")
print("Budgets found:")
for budget in response.get('Budgets', []):
print(f" - {budget.get('BudgetName')}: {budget.get('BudgetType')}")
except client.exceptions.NotFoundException:
print("No budgets found for account.")
except Exception as e:
print(f"An error occurred: {e}")
Debug
Known issues
breakingStarting with mypy-boto3-builder version 8.12.0 (which generates mypy-boto3-budgets), support for Python 3.8 has been removed across all generated packages. Ensure your Python environment is 3.9 or newer.fixUpgrade Python to 3.9 or higher.
affects: mypy-boto3-builder >=8.12.0
breakingmypy-boto3-builder version 8.9.0 introduced breaking changes to generated TypeDef naming conventions. Packed method arguments now use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`), and conflicting `Extra` postfixes are moved to the end (e.g., `CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`). This may affect explicit `TypeDef` imports.fixReview and update explicit `TypeDef` imports and usage to reflect the new naming conventions.
affects: mypy-boto3-builder >=8.9.0
gotchaThis package provides only type annotations. You must still install the actual `boto3` library for your code to run. `mypy-boto3-budgets` provides no runtime functionality on its own.fixEnsure `boto3` is installed in your environment: `pip install boto3`.
affects: All versions
gotchamypy-boto3-builder migrated to PEP 561 compliant packages with release 8.12.0. While this improves standard compatibility, ensure your `mypy` version is up-to-date to correctly discover and use these stub packages.fixUpdate `mypy` to the latest version: `pip install --upgrade mypy`.
affects: mypy-boto3-builder >=8.12.0
gotchaPyCharm users might experience slow performance with Literal overloads in these stubs (due to PyCharm issue PY-40997). It is recommended to use `boto3-stubs-lite` (if available for the service), or disable PyCharm's type checker and rely on external tools like `mypy` or `pyright`.fixConsider `boto3-stubs-lite`, or configure PyCharm to use `mypy` or `pyright` for type checking, disabling its built-in type checker.
affects: All versions
Upgrade
Version history
1.43.15latest on PyPI · released May 26, 2026
Audit
Dependencies
boto3requiredProvides the core AWS SDK functionality that these stubs type-hint.
mypyrequiredThe primary static type checker for which these stubs are designed.