No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

__init__.py 1.4KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #-*- coding: utf-8 -*-
  2. ## @package lodel.settings Lodel2 settings package
  3. #
  4. # @par Configuration files
  5. # The configurations files are in ini format (thank's python ConfigParser...).
  6. # To know how the settings are validated and specified see
  7. # @ref lodel.settings.validator and @ref howto_writeplugin_basicstruct
  8. # The configuration is divided in two parts :
  9. #- a global configuration file that contains
  10. # - the path to the lodel2 lib directory
  11. # - the paths of directories containing plugins
  12. #- a conf.d directories containing multiple configuration files
  13. #  
  14. # @par Bootstrap/load/use in lodel instance
  15. # To use Settings in production you have to write a loader that will bootstrap
  16. # the Settings class allowing @ref lodel.settings.__init__.py to expose a copy
  17. # of the lodel.settings.Settings representation of the
  18. # @ref lodel.settings.settings.Settings.__confs . Here is an example of
  19. # loader file :
  20. # <pre>
  21. # #-*- coding: utf-8 -*-
  22. # from lodel.settings.settings import Settings
  23. # Settings.bootstrap(
  24. # conf_file = 'somepath/settings_local.ini',
  25. # conf_dir = 'somepath/conf.d')
  26. # </pre>
  27. # Once this file is imported it allows to all lodel2 modules to use settings
  28. # like this :
  29. # <pre>
  30. # from lodel.settings import Settings
  31. # if Settings.debug:
  32. # print("DEBUG MODE !")
  33. # </pre>
  34. #
  35. from lodel.settings.settings import SettingsRO, Settings