Re: [sqlalchemy] Use multiple database for read and write operations

2015-02-16 Thread ahmadjaved . se
Thanks Michael for your time. Yes, I am using scope session to create Session. I want that all types of write operations *(insert, delete, update)* should run on write engine and only read operations will perform on read engine. class SQLAlchemySessionRouter(Session): def get_bind(self,

[sqlalchemy] Use multiple database for read and write operations

2015-02-14 Thread ahmadjaved . se
Hi, I am working on a web site using Python Django and SQLAlchemy ORM. I want to do all read operations in separate database and write operations in separate database. So I tried *Mike Bayer*'s solution ( http://techspot.zzzeek.org/2012/01/11/django-style-database-routers-in-sqlalchemy/)

Re: [sqlalchemy] Use multiple database for read and write operations

2015-02-14 Thread Michael Bayer
ahmadjaved...@gmail.com wrote: Hi, I am working on a web site using Python Django and SQLAlchemy ORM. I want to do all read operations in separate database and write operations in separate database. So I tried Mike Bayer's solution