buffalo_panel.config.load_panel_case

buffalo_panel.config.load_panel_case(path)[source]

Load a structured panel case from a JSON or YAML file.

Parameters:

path (str | Path) – File path to a serialized Buffalo Panel case. Supported suffixes are .json, .yaml, and .yml.

Returns:

Typed case spec ready for solve_panel_case.

Return type:

PanelCaseSpec

Raises:
  • ValueError – If the file suffix is unsupported, the parsed document is not a mapping, or the payload cannot be converted into the case schema.

  • json.JSONDecodeError – If a JSON file is syntactically invalid.

  • yaml.YAMLError – If a YAML file is syntactically invalid.