I'm exploring the use of python's bottle web framework. The web application must be extensible. That is, I will have a folder like "some/path/extensions/" into which future developers should be able to place extensions to this application. So for example: if the extension is called "treelayout" (with its own set of html files, js files etc, these files would be placed in .../.../extensions/treelayout/ folder. My goal is to have a url router that looks something like:
@GET("/some/path/extensions/:module/:func/:params")
def callmodule(module, func, params):
#D = dictionary made out of variable number of params.
#Then call module.func(D) <== How can I do this given that module and func are strings?
Example, someone could call "h++p: //.../treelayout/create/maxnodes/100/fanout/10/depth/3" and this would call the new extension treelayout.create( {maxnodes:100, fanout:10, depth:3} ).
Any idea if this is possible to do with bottle or any other python framework?