> For the complete documentation index, see [llms.txt](https://docs.snowddl.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snowddl.com/advanced/architecture-overview/config.md).

# Config

<mark style="color:purple;">**Config**</mark> is a collection of <mark style="color:blue;">**blueprints**</mark>.

Config is represented by class `SnowDDLConfig`, which is located in [`config.py`](https://github.com/littleK0i/SnowDDL/blob/master/snowddl/config.py).

### Methods

* `__init__(env_prefix=None)` \
  Initialize config with optional [env prefix](/guides/other-guides/env-prefix.md), which should be applied to all blueprints.<br>
* `get_blueprints_by_type(cls: Type[T_Blueprint]) -> Dict[str,T_Blueprint]`\
  Accepts blueprint type (class). Returns all blueprints of this type.<br>
* `get_blueprints_by_type_and_pattern(cls: Type[T_Blueprint], pattern: IdentPattern) -> Dict[str,T_Blueprint])`\
  Accepts blueprint type (class) and [Unix-style pattern](https://docs.python.org/3/library/fnmatch.html). Returns all blueprints of this type with full names matching pattern. Example of pattern: `db1.sc1.my_tables_*`<br>
* `add_blueprint(bp: AbstractBlueprint)`\
  Accept instance of blueprint. Add this blueprint to collection. If blueprint of this type with the same `full_name` already exists, it will be replaced.<br>
* `remove_blueprint(bp: AbstractBlueprint)`\
  Accepts instance of blueprint. Removes this blueprint from collection. Throws `ValueError` exception if blueprint does not exist in config.<br>

### Properties

* **.env\_prefix** (str) - normalized [env prefix](/guides/other-guides/env-prefix.md), upper cased and with `__` at the end. It should be used to build object identifiers.
* **.blueprints** (dict) - blueprints in collection.
  * *{key}* (type) - blueprint type (class).
  * *{value}* (dict)
    * *{key}* (str) - full name of object, stored as string.
    * *{value}* (blueprint) - blueprint dataclass object.
* **.placeholders** (dict) - [placeholders](/basic/yaml-placeholders.md) used by <mark style="color:orange;">**parsers**</mark> during processing of YAML configs.
  * *{key}* (str) - name of placeholder.
  * *{value}* (bool, float, int, str) - value of placeholder.
