How to do plugins using eggs

Fri 17 April 2009 by Peter Ward

(Just so that I don't forget, and because some of you may not have seen this before.)

This is the magic Python code which automagically gets eggs with the entry point "my.plugin.namespace" declared.

for egg_plugin in pkg_resources.iter_entry_points('my.plugin.namespace'):
    print egg_plugin.name

Comments