I have read Pyramid documentation and some tutorials, but still don’t know how to structure my project the right way.
From what I’ve learned, you should make everything as a own Application (which I like so I can reuse everything pretty easy), but I can’t figure out how to do it “the best way”.
Let’s say I have a Project called MainApp and I want to use a Blog and a Gallery. Do I make a project for each, build the egg and then just install it to MainApp? Will the setup merge any unnecessary settings into the ini’s?
Pyramid uses the
Configurator.include()method to define boundaries between different pluggable applications, see Extending An Existing Pyramid Application.The
.include()method accepts either a callable, or a python path to a callable, so you can use both separate eggs and a set of nested packages inside your main project package.You’ll have to decide for yourself if you need some of these pluggable elements to be separate python components (distributed with a setup.py, installable as an egg). If they are intended to be reusable outside the project, then keep them separate.