On Friday, January 11, 2019 at 2:45:58 PM UTC-5, Mike Bayer wrote:
>
> if these "binds" point to exactly the same database schema and just 
> have different permissions you might find it much easier to use one 
> session with two binds.    You can override get_bind() to use a 
> different engine for write operations on a specific model.    there's 
> an example of this at: 
>
> https://techspot.zzzeek.org/2012/01/11/django-style-database-routers-in-sqlalchemy/
>  
>   .    there's also a special hook where you can persist individual 
> instances of a class on different database connections too but you 
> shouldn't need that here. 
>
>
Wow, Mike... this is an AMAZING feature/flexibility.
 

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to