def load(filename): """ Loads the specified configuration file. :param filename: the configuration file to be loaded :returns: a map with the configuration from filename """ with utils.resource_stream(filename, __name__) as config_file: return yaml.load(config_file)
""" Barbante library documentation. """ from barbante.utils import resource_stream # Use the generated VERSION file to get the package version VERSION_FILENAME = 'VERSION' with resource_stream(VERSION_FILENAME) as version_file: __version__ = version_file.read().strip().decode("utf-8") __app_name__ = "barbante " + __version__