OpenQuizz
Une application de gestion des contenus pédagogiques
|
Public Member Functions | |
def | __init__ (self, isolated, load_only=None) |
def | load (self) |
def | get_file_to_edit (self) |
def | items (self) |
def | get_value (self, key) |
def | set_value (self, key, value) |
def | unset_value (self, key) |
def | save (self) |
def | get_environ_vars (self) |
def | iter_config_files (self) |
def | get_values_in_config (self, variant) |
def | __repr__ (self) |
Data Fields | |
isolated | |
load_only | |
Handles management of configuration. Provides an interface to accessing and managing configuration files. This class converts provides an API that takes "section.key-name" style keys and stores the value associated with it as "key-name" under the section "section". This allows for a clean interface wherein the both the section and the key-name are preserved in an easy to manage form in the configuration files and the data stored is also nice.
def __init__ | ( | self, | |
isolated, | |||
load_only = None |
|||
) |
def __repr__ | ( | self | ) |
def get_environ_vars | ( | self | ) |
Returns a generator with all environmental vars with prefix PIP_
def get_file_to_edit | ( | self | ) |
Returns the file with highest priority in configuration
def get_value | ( | self, | |
key | |||
) |
Get a value from the configuration.
def get_values_in_config | ( | self, | |
variant | |||
) |
Get values present in a config file
def items | ( | self | ) |
Returns key-value pairs like dict.items() representing the loaded configuration
def iter_config_files | ( | self | ) |
Yields variant and configuration files associated with it. This should be treated like items of a dictionary.
def load | ( | self | ) |
Loads configuration from configuration files and environment
def save | ( | self | ) |
Save the current in-memory state.
def set_value | ( | self, | |
key, | |||
value | |||
) |
Modify a value in the configuration.
def unset_value | ( | self, | |
key | |||
) |
Unset a value in the configuration.
isolated |
load_only |