# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.snowddl.com/advanced/architecture-overview/config.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
