[PEAK] New "Plugins" and "AddOns" libraries in SVN; ObjectRoles deprecated

Phillip J. Eby pje at telecommunity.com
Fri Oct 26 16:12:50 EDT 2007

Today I renamed the ObjectRoles package to AddOns, and renamed its 
classes accordingly.  Please update your setup scripts and code accordingly, as
described here:


The new documentation for the AddOns package can be found here:


The new "Plugins" library in SVN is designed to work in combination 
with AddOns to make it easy to create extensible apps and frameworks, 
with or without setuptools entry points.  (It's essentially syntax 
sugar for lots of entry point-related tasks.)

You can browse the source code here:


Or check it out using "svn co 
svn://svn.eby-sarna.com/svnroot/Plugins/".  (You will also need to 
install a current checkout of "Contextual", which is not yet 
available on the Cheeseshop.)

The documentation can be found here:


Note that the ``PluginManager`` service (and its documentation) is 
still incomplete.  By the time I make an official release of this, it 
should have the ability to specify plugin directories, activate 
specific plugins, etc.  For now it just uses the standard working_set 
and default Environment given by setuptools.

The basic idea of how Plugins and AddOns work is that you'll define 
extensible objects using plugins.Extensible, and specify what 
plugins.Hook objects to look up extensions in.  Plugin developers 
then create AddOn classes and register them as entry points for the 
corresponding Hook, thereby dynamically extending the application's 
core objects at runtime.

Registration of hooks can be done either via entry points (i.e. in 
plugins' setup.py files) or by calling APIs in peak.util.plugins.

This work on Plugins and AddOns was brought to you today by OSAF 
funding (for the new "Architecture Pilot Project", aka 
"APP").  Please feel free to donate to OSAF here:


More information about the PEAK mailing list