1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2025-11-21 21:26:54 +01:00
lodel2_mirror/lodel/settings/__init__.py

37 lines
1.4 KiB
Python
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#-*- coding: utf-8 -*-
## @package lodel.settings Lodel2 settings package
#
# @par Configuration files
# The configurations files are in ini format (thank's python ConfigParser...).
# To know how the settings are validated and specified see
# @ref lodel.settings.validator and @ref howto_writeplugin_basicstruct
# The configuration is divided in two parts :
#- a global configuration file that contains
# - the path to the lodel2 lib directory
# - the paths of directories containing plugins
#- a conf.d directories containing multiple configuration files
#  
# @par Bootstrap/load/use in lodel instance
# To use Settings in production you have to write a loader that will bootstrap
# the Settings class allowing @ref lodel.settings.__init__.py to expose a copy
# of the lodel.settings.Settings representation of the
# @ref lodel.settings.settings.Settings.__confs . Here is an example of
# loader file :
# <pre>
# #-*- coding: utf-8 -*-
# from lodel.settings.settings import Settings
# Settings.bootstrap(
# conf_file = 'somepath/settings_local.ini',
# conf_dir = 'somepath/conf.d')
# </pre>
# Once this file is imported it allows to all lodel2 modules to use settings
# like this :
# <pre>
# from lodel.settings import Settings
# if Settings.debug:
# print("DEBUG MODE !")
# </pre>
#
from lodel.settings.settings import SettingsRO as Settings