plugin development best practices

Diez B. Roggisch deets at nospam.web.de
Thu Feb 22 08:00:43 EST 2007


Flavio wrote:

> Hi,
> 
> Nowadays the addition of functionality to programs by means  of
> plugins is very frequent.
> 
> I want to know the opinions of experienced Python developers about the
> best practices when it comes to developing a plugin system for a
> Python package.
> 
> Should plugins be modules in a separate package?
> Should there be a registry  of available plugins? how would such a
> registry  be implemented? etc.

There have been a gazillion discussions about this on this newsgroup/mailing
list. Searching the archives will get you to them.

The dynamic nature of python makes a whole range of options available.
Depending on what you want to do (how are the plugins made available and so
on), one or the other might be preferable.

One relatively current development is the usage of setuptools "entry-points"
feature, which is precisely made for discovering installed plugins:

http://peak.telecommunity.com/DevCenter/setuptools#dynamic-discovery-of-services-and-plugins


Diez



More information about the Python-list mailing list