Search code examples
pythonsqlalchemyturbogears2sqlobject

web presenting framework for SQLObject/SQLAlchemy projects


I'm looking for the most graceful way of taking a non-web project based on either SQLObject or SQLAlchemy and overlay it with a decent web-framework.

I've looked at Turbogears, and even though it looks like something I could use, the models seems to have to be defined inside the Turbogears framework. I want the core functionality (models, code) and the presenting layer (turgbogears, ?) to be separated.

I need something that can take models from my already existing codebase and help presenting data without too much hassle.


Solution

  • For this kind of thing you might have a look at Pyramid. It is very flexible in that it doesn't enforce any particular group of components (template, database engine, etc.). You could use it with either SqlObject or SqlAlchemy - it's up to you to configure it to your needs. Fortunately it is also very well documented.

    There are some Pyramid recipes for setting up SqlAlchemy as well as a couple of frameworks built on top of Pyramid that add preconfigured defaults that include SqlAlchemy: Akhet and Kufu.