libconfig.Config.set_options_from_file

Config.set_options_from_file(filename, file_format='yaml')

Load options from file.

This is a wrapper over set_options_from_JSON() and set_options_from_YAML().

Parameters:
  • filename (str) – File from which to load the options.
  • file_format (str) – File format (yaml or json).
Raises:
ValueError:If an unknown format is requested.