{"library":"sceptre","title":"Sceptre - AWS Cloud Provisioning Tool","description":"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.","language":"python","status":"active","last_verified":"Fri Apr 17","install":{"commands":["pip install sceptre"],"cli":{"name":"sceptre","version":"Sceptre, version 4.6.0"}},"imports":["from sceptre.cli import sceptre"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import os\nimport sys\nfrom io import StringIO\nfrom unittest.mock import patch\nfrom sceptre.cli import sceptre\n\n# Sceptre is primarily a CLI tool that operates on a project structure.\n# For full functionality (e.g., `launch`, `validate`), you need:\n# 1. A Sceptre project directory (e.g., `./config`, `./templates`).\n# 2. AWS credentials configured (e.g., via ~/.aws/credentials, environment variables).\n\n# This example demonstrates how to call a simple Sceptre command programmatically\n# that does not require a project setup or AWS credentials, making it runnable.\n\nprint(\"Attempting to get Sceptre version programmatically...\")\n\n# Mock sys.stdout to capture output without affecting the console directly\nwith patch('sys.stdout', new_callable=StringIO) as mock_stdout:\n    try:\n        # Call the Sceptre CLI programmatically to get its version\n        # This command is safe and does not require AWS setup.\n        sceptre([\"--version\"])\n        output = mock_stdout.getvalue()\n        print(f\"Sceptre version output:\\n{output.strip()}\")\n\n    except SystemExit as e:\n        # Sceptre CLI often uses sys.exit(), which `sceptre.cli.sceptre` reflects.\n        # A SystemExit with code 0 usually indicates success for '--version'.\n        if e.code != 0:\n            print(f\"Error: Sceptre command exited with code {e.code}\")\n        else:\n            print(f\"Sceptre command finished (exit code {e.code}).\")\n\nprint(\"\\nTo run actual Sceptre deployment commands (e.g., 'launch'):\")\nprint(\"  1. Ensure you have a Sceptre project structure (config/ and templates/ directories).\")\nprint(\"  2. Configure your AWS credentials (e.g., environment variables or ~/.aws/credentials).\")\nprint(\"  Example (if project set up): # sceptre([\\\"launch\\\", \\\"dev/my-stack\\\"])\")\n","lang":"python","description":"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.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}