procman.utils module

procman utils for file handling and config parsing.

procman.utils.get_userscripts(demo_mode=False, file_encoding='utf-8', file_extension='.yaml')[source]

Get user scripts from Munchified user cfg.

Returns:

list of scripts

procman.utils.load_base_config()[source]

Load initial procman config with our baseline example values. This is used to both run the example flask app and provide a user-facing example configuration.

Returns:

Munch config obj

procman.utils.load_config(file_encoding='utf-8', file_extension='.yaml')[source]

Load yaml configuration file and munchify the data. If ENV path or local file is not found in current directory, the default cfg will be loaded.

Parameters:
  • file_encoding (str) – file encoding of config file

  • file_extension (str) – file extension with leading separator

Return tuple:

Munch cfg obj, Path obj

Raises:

FileTypeError – if the input file is not yml