To define an applet plugin, you must
  1. write an AppletPlugin class that respects IPluginApplet interface (see below)
  2. add it to group oalab.applet

1. Copy paste this code and fill it with right names and instructions. (replace all xyz, respecting case, with your applet name). For example Xyz -> HelpApplet

class PluginXyz(object):

    name = 'Xyz'
    alias = 'Xyz'

    def __call__(self):
        # Write your code here

    def graft(self, **kwds):
        # Write your code here

To avoid to rewrite all plugins from scratch, you can derivate your plugin from PluginApplet :

from openalea.oalab.plugins.applets import PluginApplet
class PluginXyz(PluginApplet):

2. Once this class has been written, just register it in the file of your python package.

    'oalab.applet': [
        'Xyz = mypackage.plugins:PluginXyz',

With mypackage.plugins python module path (equivalent to 'mypackage/') and 'PluginXyz' the class name.


The module called provides this help widget:

OpenAleaLab is the main application that gather all widgets. We want to add HelpWidget in the MainWindow and allow communication between both classes. For that purpose, we create a Plugin called HelpWidgetPlugin in helper package:

It is very important to notice that adding widget in the right area is done by the plugin, not the application. Application does almost nothing, it is just a container of widgets. Real application intelligence is delegated to Plugins (placing and linking components) and components (doing real treatments).

Finally, we register this plugin in of package helper.


class openalea.oalab.plugins.applets.PluginApplet

Partial implementation of a plugin applet. You can use it by derivating your class from PluginApplet.

Table Of Contents

Previous topic


Next topic


This Page