Registry / type-stubs / types-boto3-cloudformation

types-boto3-cloudformation

JSON →
library1.43.62pypypi✓ verified 24d ago

types-boto3-cloudformation provides type annotations for the `boto3` AWS SDK's CloudFormation service, compatible with static analysis tools like mypy, pyright, and IDEs such as VSCode and PyCharm. It is generated by the `mypy-boto3-builder` (currently version 8.12.0) and typically releases updates in sync with `boto3` to provide accurate type hints for the latest AWS service APIs. The current version of these annotations is 1.42.3, matching `boto3`'s version.

pip install types-boto3-cloudformation
INSTALL
IMPORT
SIG · TYPES-BOTO3-CLOUDF
T
types-boto3-cloudformation
type-stubspythonv1.43.62
Install
3.2s 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.62 · 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 · 20.3MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 3.2s · import 0.000s · 21MB
18MB installed
● package 18MB
Code
Verified usage

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

CloudFormationClient
from types_boto3_cloudformation import CloudFormationClient
from types_boto3_cloudformation import CloudFormationClient

This quickstart demonstrates how to obtain a typed CloudFormation client and use it to list stacks. The `TYPE_CHECKING` block ensures the type imports are only used during static analysis, avoiding a runtime dependency if desired. You must have AWS credentials configured for boto3 to function (e.g., via `~/.aws/credentials` or environment variables).

import boto3 from typing import TYPE_CHECKING if TYPE_CHECKING: from types_boto3_cloudformation.client import CloudFormationClient from types_boto3_cloudformation.type_defs import StackSummaryTypeDef # Create a boto3 client. Types are typically auto-discovered by IDEs/type checkers # if types-boto3-cloudformation is installed. client: CloudFormationClient = boto3.client("cloudformation") try: # Example: List CloudFormation stacks response = client.list_stacks(StackStatusFilter=[ 'CREATE_COMPLETE', 'UPDATE_COMPLETE', 'ROLLBACK_COMPLETE' ]) print("CloudFormation Stacks:") for stack_summary: StackSummaryTypeDef in response.get("StackSummaries", []): print(f" - {stack_summary['StackName']} ({stack_summary['StackStatus']})") except Exception as e: print(f"Error listing stacks: {e}") # In a real application, handle specific AWS exceptions like ClientError
Debug
Known issues
breakingPython 3.8 support was removed with `mypy-boto3-builder` version 8.12.0. Users on Python 3.8 will need to upgrade to Python 3.9 or newer to use `types-boto3-cloudformation` versions generated by this builder version or newer.
fix
Upgrade your Python environment to 3.9 or higher.
affects: mypy-boto3-builder >=8.12.0 (and corresponding types-boto3-cloudformation versions)
breakingType definition (TypeDef) naming conventions changed in `mypy-boto3-builder` 8.9.0. Specifically, packed method arguments use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`), and conflicting `Extra` postfixes moved to the end (e.g., `CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`).
fix
Review and update `TypeDef` import paths and names in your code to match the new conventions.
affects: mypy-boto3-builder >=8.9.0 (and corresponding types-boto3-cloudformation versions)
gotchaThis package provides *only* type annotations. The actual `boto3` library must be installed separately for your code to run at runtime. `types-boto3-cloudformation` does not include or replace the `boto3` runtime.
fix
Ensure `boto3` is installed in your project: `pip install boto3`.
affects: All versions
gotchaPyCharm users might experience slow performance or high CPU usage due to `Literal` overloads (issue PY-40997). The recommendation is to use `types-boto3-lite` versions or disable PyCharm's internal type checker and use `mypy` or `pyright` externally.
fix
Consider installing `types-boto3-lite-cloudformation` instead (`pip install types-boto3-lite-cloudformation`) or configure your PyCharm environment to use external type checkers.
affects: All versions (PyCharm specific)
gotchaWith the migration to PEP 561 packages in `mypy-boto3-builder` 8.12.0, while core import paths should remain stable, there's a potential for tooling that relied on non-standard stub discovery mechanisms to require updates or configuration adjustments.
fix
Ensure your static analysis tools (mypy, pyright) and IDEs are updated to their latest versions and configured to correctly discover PEP 561-compliant stub packages.
affects: mypy-boto3-builder >=8.12.0 (and corresponding types-boto3-cloudformation versions)
Upgrade
Version history
1.43.62latest on PyPI · released Jul 31, 2026
Audit
Dependencies
pythonrequiredRequired Python version.
boto3requiredThis package provides type hints for boto3. Boto3 itself must be installed separately to provide runtime functionality.
Agent activity
42 hits · last 30 days
node
38
OpenAI (training)
1
Resources