settings
de_wiktio.settings
¶
Settings module.
Classes:
-
Settings
–Settings class for the de_wiktio package.
Classes¶
Settings
¶
Settings class for the de_wiktio package.
Allowed keys:
- XML_FILE
, for path to the XML dump file
- DICT_PATH
, for path to the dictionary folder
Settings are saved in the config.json
file in the package folder.
If the configuration file does not exist, it will be created when get
or set
methods are called.
Methods:
Functions¶
get(key, default=None)
classmethod
¶
Get a value from the configuration file.
Allowed keys are: XML_FILE
, DICT_PATH
.
Source code in de_wiktio\settings.py
41 42 43 44 45 46 47 |
|
set(key, value)
classmethod
¶
Set a value in the configuration file.
Allowed keys
XML_FILE
, for path to the XML dump fileDICT_PATH
, for path to the dictionary folder
To delete a value, set it to None
.
Source code in de_wiktio\settings.py
49 50 51 52 53 54 55 56 57 58 59 60 61 |
|