vsgen.util.config module

This module provides all functionality for extending Python’s config parser functionality.

The module defines the class VSGConfigParser. The VSGConfigParser class provides the main functionality of using Python’s native config parser.

class vsgen.util.config.VSGConfigParser(*args, **kwargs)[source]

Bases: configparser.ConfigParser

The VSG ConfigParser extends Python’s ConfigParser class with VSG specific functionality.

Note:VSGConfigParser uses ExtendedInterpolation as the default interpolation.
getdir(section, option, raw=False, vars=None, fallback='', validate=False)[source]

A convenience method which coerces the option in the specified section to a directory.

getdirs(section, option, raw=False, vars=None, fallback=[])[source]

A convenience method which coerces the option in the specified section to a list of directories.

getfile(section, option, raw=False, vars=None, fallback='', validate=False)[source]

A convenience method which coerces the option in the specified section to a file.

getlist(section, option, raw=False, vars=None, fallback=[], delimiters=', ')[source]

A convenience method which coerces the option in the specified section to a list of strings.

set(section, option, value=None)[source]

Extends set() by auto formatting byte strings into unicode strings.

update(**kwargs)[source]

Extends set() by auto formatting byte strings into unicode strings.