Skip Navigation

PieFed now includes a simple plugin engine so third parties can extend PieFed functionality without adding their code to the main PieFed project. It's pretty simple and bare-bones at the moment and is more of a 'tech preview' stage rather than something to get too serious about.

Each plugin is a directory under app/plugins and must include a init.py file. In that file there must be a plugin_info() function. Plugins can have their code executed by adding a @hook decorator to a function, as in the image above.

The example plugin that comes with PieFed just prints some debugging messages to the console before and after a post is created but the sky is the limit. Eventually plugins could modify data at any stage of the content lifecycle, react to people joining or leaving a community, votes, send email, etc etc.

What I've built today is just the beginning and I'm hoping other contributors will take this framework and add more hooks and incorporate it into the rest of the system.

9 comments
9 comments