13 lines
248 B
Python
13 lines
248 B
Python
from pathlib import Path
|
|
|
|
import yaml
|
|
|
|
from core.schemas import config
|
|
|
|
|
|
def load_config(path: Path) -> config.Config:
|
|
with path.open(encoding="utf-8") as f:
|
|
content = yaml.safe_load(f)
|
|
|
|
return config.Config.model_validate(content)
|