from pathlib import Path
from typing import Dict
from typing import Any
import yaml


def config_from_file(f: Path) -> Dict[str, Any]:
    """Return parsed config from a YAML file"""
    return yaml.safe_load(f.read_text()) or {}