sceptre.cli package¶
sceptre.cli
This module implements Sceptre’s CLI, and should not be directly imported.
Submodules¶
sceptre.cli.create module¶
sceptre.cli.delete module¶
sceptre.cli.describe module¶
sceptre.cli.execute module¶
sceptre.cli.helpers module¶
-
class
sceptre.cli.helpers.
CfnYamlLoader
(stream)[source]¶ Bases:
yaml.loader.SafeLoader
-
yaml_multi_constructors
= {'!': <function _tag_constructor>}¶
-
-
class
sceptre.cli.helpers.
ColouredFormatter
(fmt=None, datefmt=None)[source]¶ Bases:
logging.Formatter
ColouredFormatter add colours to all stack statuses that appear in log messages.
-
format
(record)[source]¶ Colours and returns all stack statuses in
record
.Parameters: record (str) – The log item to format. Returns: str
-
stack_status_colourer
= <sceptre.stack_status_colourer.StackStatusColourer object>¶
-
-
class
sceptre.cli.helpers.
CustomJsonEncoder
(skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, encoding='utf-8', default=None)[source]¶ Bases:
json.encoder.JSONEncoder
CustomJsonEncoder is a JSONEncoder which encodes all items as JSON by calling their __str__() method.
-
sceptre.cli.helpers.
catch_exceptions
(func)[source]¶ Catches and simplifies expected errors thrown by sceptre.
catch_exceptions should be used as a decorator.
Parameters: func – The function which may throw exceptions which should be simplified. Returns: The decorated function.
-
sceptre.cli.helpers.
setup_logging
(debug, no_colour)[source]¶ Sets up logging.
By default, the python logging module is configured to push logs to stdout as long as their level is at least INFO. The log format is set to “[%(asctime)s] - %(name)s - %(message)s” and the date format is set to “%Y-%m-%d %H:%M:%S”.
After this function has run, modules should:
import logging logging.getLogger(__name__).info("my log message")
Parameters: debug (bool) – A flag indication whether to turn on debug logging. No_colour: A flag to indicating whether to turn off coloured output. Returns: A logger. Return type: logging.Logger
-
sceptre.cli.helpers.
simplify_change_set_description
(response)[source]¶ Simplies the response from the AWS describe change set API.
Parameters: response (dict) – The original api response. Returns: A more concise description of the change set. Return type: dict