Are there Python ORMs out there that support multiple independent databases concurrently in use?

Posted by sdt on Stack Overflow See other posts from Stack Overflow or by sdt
Published on 2010-04-03T21:10:35Z Indexed on 2010/04/03 21:13 UTC
Read the original article Hit count: 286

Filed under:
|
|

I'm writing an application in Python where I wish to use sqlite as the backing store for documents edited by the app, with documents generally living in memory, but being saved to disk-based databases when the application saves.

Ideally I'd like to use something like an ORM to make access to the data from my Python application code simple. Unfortunately it seems like the majority of Python ORMs, including SQLAlchemy, SQLObject, Django, and Storm, associate the database connection (or engine or whatever) with the classes representing table data, rather than instances of those classes. This restricts these ORMs to working with a single database connection across all instances. Since I'd like to support having multiple documents open simultaneously, this isn't going to work for me.

Are there any ORMs out there that support this usage model in Python? Bazaar seems to support this, but it's quite out of date, and at first glance appears to have some other shortcomings.

Thanks for any suggestions!

© Stack Overflow or respective owner

Related posts about python

Related posts about orm