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

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #-*- coding: utf-8 -*-
  2. ## @page howto_writeplugin Write a plugin howto
  3. #
  4. # @section howto_writeplugin_basicstruct Plugin basic structure
  5. # A plugins is a python package that have to contains 3 files :
  6. #- <code>__init__.py</code>
  7. #- <code>main.py</code> ( defined in @ref lodel.plugin.plugins.MAIN_FILENAME )
  8. #- <code>confspec.py</code> ( defined in
  9. #@ref lodel.plugin.plugins.CONFSPEC_FILENAME )
  10. #
  11. # There is an example plugin in @ref plugins/dummy
  12. #
  13. # @subsection howto_writreplugin_confspec Plugin configuration specification
  14. # First of all a good practice is to preffix all plugin specific configuration
  15. # key with <code>lodel2.plugin.PLUGIN_NAME</code>.
  16. #
  17. # A configuration specification is a dict containing dict containing
  18. # tupe(DEFAULT_VALUE, VALIDATOR). The first level dict keys are sections, and
  19. # the dictionnary contained in it contains conf keys. More information on
  20. # validators : @ref lodel.settings.validator
  21. # @subsubsection howto_writreplugin_confspec_example Example :
  22. #
  23. #A confspec that matches this peace of configuration file
  24. #<pre>
  25. #[lodel2.plugin.fooplugin]
  26. #hello = ...
  27. #foo = ...
  28. #bar = ...
  29. #</pre>
  30. #would be
  31. #<pre>
  32. #{
  33. # 'lodel2.plugin.fooplugin': {
  34. # 'foo': ...,
  35. # 'bar': ...,
  36. # 'hello': ..., } }
  37. #</pre>
  38. from .hooks import LodelHook
  39. from .plugins import Plugin, CustomMethod