Lala Config Module¶
Config module
-
lala.config.
get
(key, converter=None)[source]¶ Returns the value of a config option. The section is the name of the calling file.
Default values for all keys can be set with
set_default_options()
.Parameters: key – The key to lookup
-
lala.config.
get_int
(*args)[source]¶ Returns the value of a config option as an int.
Parameters: *args – Return type: int
-
lala.config.
get_list
(*args)[source]¶ Gets a list option.
Parameters: *args – Return type: list of strings
-
lala.config.
set
(key, value, plugin=None)[source]¶ Sets the
value
ofkey
. The section is the name of the calling file.
-
lala.config.
set_default_options
(**kwargs)[source]¶ Sets the default options for a plugin.
The names of the arguments in
kwargs
will be used as the option names, the values as the values of the options.
-
lala.config.
set_list
(key, value, *args)[source]¶ Sets option
key
tovalue
wherevalue
is a list of values.None of the values in
value
are allowed to containlala.config._LIST_SEPARATOR
.This method does not preserve the type of the items in the list, they’re all passed through
str()
.Parameters: - key – See
lala.config.set()
- value – A list of values for
key
.
- key – See
-
lala.config.
_LIST_SEPARATOR
= ','¶ Used as a separator when storing lists of values in the config file