or, you can just have a python module where you only build the shelf. Might not be your case specifically, but people separate code from the configuration too often, but plain code is often more efective than building a configuration, and a configuration interpreter. Going that direction, any additional features you want to build through configuration you have to abstract via code. Too complicated. Python code like below is much easier:
Imagine the above, but expressed as configuration (which handler method from which module to load), the custom code on top to interpret that configuration, dynamic module loading..
import my.custom.code.ui.shelfDsl as shelf
g = shelf.newMenuGroup("for building things")
g.addSimpleButton("build thing", module1.buildStuff)
g.addSimpleButton("build another thing ", module1.buildStuff_advanced_newest)
g = shelf.newMenuGroup("for animating things")
g.addSimpleButton("animate thing", module2.animStuff)
g.addSimpleButton("animate another thing ", module2.animStuff_advanced_newest)
Prefer simple code.