[Grok-dev] Multiple Databases with SQLAlchemy, z3c.saconfig, megrok.rdb

Martijn Faassen faassen at startifact.com
Thu Sep 16 11:15:22 EDT 2010


On 09/14/2010 11:15 PM, Jeffrey D Peterson wrote:
> I have multiple legacy databases I need to connect to.
>
> It appears that using megrok.rdb, et, al will not provide me with that
> functionality, though SQLAlchemy will. Am I missing something? Just want
> to make sure before I embark on rolling my own.

You'll probably have the most difficulty with megrok.rdb.

z3c.saconfig however exposes a function 'named_scoped_session'. You can 
supply it with a name to get a session object that works with a 
particular database setup. If you register the session utilities with 
names this should work. (I think the same applies to the engine stuff)

Regards,

Martijn



More information about the Grok-dev mailing list