News for hackers. Stuff that matters.
Re:Ask YC: Should I use a framework or just write the code m... by nostrademons on Thursday November 15, 2007 @08:06PM (#80459)
I use a very thin database access library over DBAPI (modeled after PEAR DB, basically just wrapping queries with logging and timing, and converting results to Python dicts instead of DBAPI cursors). It was no problem using this with Pylons, instead of the default SQLAlchemy. If you don't like a Pylons module, just swap it out; the framework is built so you can easily substitute your own components in instead of the defaults.

I used the same library with web.py. Web.py's built-in database library is pretty impractical. Global DB connection means it's very difficult to do testing/mockobjects, and it wouldn't scale beyond one machine.

There are no comments on this comment yet.