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.

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

str|unicode

class uwsgiconf.formatters.FormatterBase(sections)

Base class for configuration formatters.

iter_options()

Iterates configuration sections groups options.

class uwsgiconf.formatters.IniFormatter(sections)

Translates a configuration as INI file.