SnowDDL
Search…
🟣
Config
Config is a collection of blueprints.
Config is represented by class SnowDDLConfig, which is located in config.py.

Methods

  • __init__(env_prefix=None) Initialize config with optional env prefix which should be applied to all blueprints.
  • get_blueprints_by_type(cls: Type[T_Blueprint]) -> Dict[str,T_Blueprint] Accept blueprint type (class). Return all blueprints of this type.
  • add_blueprint(bp: AbstractBlueprint) Accept instance of blueprint. Add blueprint to config. If blueprint with the same full_name already exists, replace it.
  • add_error(path: Path, e: Exception) Accept path object (usually to YAML config file) and instance of exception. Add config validation error.

Properties

  • .env_prefix (str) - normalized env prefix, upper cased and with __ at the end, should be used internally to build identifiers.
  • .blueprints (dict) - blueprints added to config.
    • {key} (type) - blueprint type (class).
    • {value} (dict)
      • {key} (str) - full name of object, stored as string.
      • {value} (blueprint) - blueprint dataclass object.
  • .errors (list) - config validation errors.
    • {items} (dict)
      • path (Path) - path to file (or something else) which caused error.
      • error (Exception) - exception object.
  • .placeholders (dict) - placeholders used by parsers during processing of YAML configs.
    • {key} (str) - name of placeholder.
    • {value} (bool, float, int, str) - value of placeholder.
Last modified 3mo ago
Copy link
On this page
Methods
Properties