Registry / aws / sceptre

sceptre

JSON →
library4.7.0pypypi✓ verified 82d ago

Sceptre is an AWS Cloud Provisioning Tool that simplifies the deployment and management of CloudFormation stacks and stack groups. It extends CloudFormation with features like template generation, environment-specific configurations, and programmatic resolution of values. The current version is 4.6.0, and it maintains an active development cycle with regular releases addressing features and bug fixes, typically on a quarterly or bi-annual basis for major versions.

pip install sceptre
INSTALL
IMPORT
SIG · SCEPTRE
S
sceptre
awspythonv4.7.0
Install
6.5s avg
Import
Disk
78MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.7.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 · 73.5MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 6.5s · import 0.000s · 75MB
78MB installed
● package 78MB
Code
Verified usage

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

NullHandler
from sceptre import NullHandler
from sceptre.cli import sceptre
version
from sceptre import version
from sceptre.cli import sceptre
logging
from sceptre import logging
from sceptre.cli import sceptre

This quickstart demonstrates how to programmatically invoke Sceptre commands using its Python API. It runs a simple version check that doesn't require an AWS environment or a Sceptre project structure. For full functionality like deploying stacks, you would need a properly configured Sceptre project (with `config/` and `templates/` directories) and AWS credentials.

import os import sys from io import StringIO from unittest.mock import patch from sceptre.cli import sceptre # Sceptre is primarily a CLI tool that operates on a project structure. # For full functionality (e.g., `launch`, `validate`), you need: # 1. A Sceptre project directory (e.g., `./config`, `./templates`). # 2. AWS credentials configured (e.g., via ~/.aws/credentials, environment variables). # This example demonstrates how to call a simple Sceptre command programmatically # that does not require a project setup or AWS credentials, making it runnable. print("Attempting to get Sceptre version programmatically...") # Mock sys.stdout to capture output without affecting the console directly with patch('sys.stdout', new_callable=StringIO) as mock_stdout: try: # Call the Sceptre CLI programmatically to get its version # This command is safe and does not require AWS setup. sceptre(["--version"]) output = mock_stdout.getvalue() print(f"Sceptre version output:\n{output.strip()}") except SystemExit as e: # Sceptre CLI often uses sys.exit(), which `sceptre.cli.sceptre` reflects. # A SystemExit with code 0 usually indicates success for '--version'. if e.code != 0: print(f"Error: Sceptre command exited with code {e.code}") else: print(f"Sceptre command finished (exit code {e.code}).") print("\nTo run actual Sceptre deployment commands (e.g., 'launch'):") print(" 1. Ensure you have a Sceptre project structure (config/ and templates/ directories).") print(" 2. Configure your AWS credentials (e.g., environment variables or ~/.aws/credentials).") print(" Example (if project set up): # sceptre([\"launch\", \"dev/my-stack\"])")
sceptre --version
Debug
Known issues
breakingSceptre v4.0.0 introduced significant breaking changes to the configuration file format and internal API. The `stack_group` concept was removed, `stack_group_config` was renamed, and resolver syntax changed.
fix
Review the Sceptre v4 migration guide in the official documentation. Update all `config/*.yaml` files and any custom resolvers/hooks to the new format. For Python 3.9 users, upgrade to Python 3.10+ as v4.0.0 requires it.
affects: 4.0.0 and above
breakingSceptre v4.0.0 dropped support for Python versions older than 3.10. Users on Python 3.9 or earlier must upgrade their Python environment.
fix
Upgrade your Python installation to version 3.10 or newer (e.g., 3.10, 3.11, 3.12).
affects: 4.0.0 and above
gotchaSceptre is primarily a CLI tool. While `sceptre.cli.sceptre` allows programmatic invocation of CLI commands, direct interaction with internal Sceptre objects (e.g., `Stack`, `StackGroup` instances) can be less stable or documented for general programmatic control. The internal API might change more frequently than the CLI interface.
fix
For most use cases, stick to the `sceptre.cli.sceptre` entry point when integrating Sceptre into Python scripts. Only delve into internal object manipulation when developing custom resolvers, hooks, or core Sceptre extensions, and be prepared for potential API changes between minor versions.
affects: All versions
gotchaSceptre has a specific precedence for configuration values: CLI arguments > environment variables (e.g., `SCEPTRE_ACCOUNT_ID`, `SCEPTRE_REGION`) > config file values > default values. Misunderstanding this hierarchy can lead to unintended deployments (e.g., deploying to the wrong AWS account or region).
fix
Always explicitly define critical parameters like `account_id` and `region` in your `config/*.yaml` files. If using environment variables, ensure they are correctly set and not accidentally overridden or overriding a desired config value. Prioritize CLI flags for one-off overrides.
affects: All versions
Upgrade
Version history
4.7.0latest on PyPI · released May 22, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
23 hits · last 30 days
node
22
Resources
sceptre — pip install sceptre · libregistry