Config Formatters

Here belong tools for configuration fomatting purposes.

uwsgiconf.formatters.format_print_text(text, color_fg=None, color_bg=None)

Format given text using ANSI formatting escape sequences.

Could be useful gfor print command.

  • text (str|unicode) –
  • color_fg (str|unicode) – text (foreground) color
  • color_bg (str|unicode) – text (background) color
Return type:


class uwsgiconf.formatters.FormatterBase(sections)

Base class for configuration formatters.


Iterates configuration sections groups options.

class uwsgiconf.formatters.IniFormatter(sections)

Translates a configuration as INI file.

class uwsgiconf.formatters.ArgsFormatter(sections)

Translates a configuration to command line arguments.

uwsgiconf.formatters.FORMATTERS = {'args': <class 'uwsgiconf.formatters.ArgsFormatter'>, 'ini': <class 'uwsgiconf.formatters.IniFormatter'>}

Available formatters by alias.