[sqlalchemy] Multiple databases and event.listen?

2014-01-11 Thread Ed Willis
Say I've got more than one database (in my specific example, they're sqlite3 databases). All the databases have the same table declarations in their schemas. I want to listen for insert/update/delete events in one specific database and then propagate data from that database to the others.

Re: [sqlalchemy] Multiple databases and event.listen?

2014-01-11 Thread Michael Bayer
On Jan 11, 2014, at 1:11 PM, Ed Willis ewil...@jesande.com wrote: Say I've got more than one database (in my specific example, they're sqlite3 databases). All the databases have the same table declarations in their schemas. I want to listen for insert/update/delete events in one specific

Re: [sqlalchemy] Multiple databases and event.listen?

2014-01-11 Thread ewillis
BayerSent: Saturday, January 11, 2014 1:22 PMTo: sqlalchemy@googlegroups.comReply To: sqlalchemy@googlegroups.comSubject: Re: [sqlalchemy] Multiple databases and event.listen?On Jan 11, 2014, at 1:11 PM, Ed Willis ewil...@jesande.com wrote:Say I've got more than one database (in my specific example

Re: [sqlalchemy] Multiple databases and event.listen?

2014-01-11 Thread Michael Bayer
] Multiple databases and event.listen? On Jan 11, 2014, at 1:11 PM, Ed Willis ewil...@jesande.com wrote: Say I've got more than one database (in my specific example, they're sqlite3 databases). All the databases have the same table declarations in their schemas. I want to listen

Re: [sqlalchemy] Multiple databases and event.listen?

2014-01-11 Thread ewillis
: Michael BayerSent: Saturday, January 11, 2014 2:32 PMTo: sqlalchemy@googlegroups.comReply To: sqlalchemy@googlegroups.comSubject: Re: [sqlalchemy] Multiple databases and event.listen?On Jan 11, 2014, at 2:20 PM, ewil...@jesande.com wrote:Wow, thanks a ton. So if I get you right, I'd register for insert

Re: [sqlalchemy] multiple databases?

2013-12-11 Thread Richard Gerd Kuesters
thanks! in fact i'm using twisted, and i make use of some abstractions on top of query so they can be treated as a deferred :) but either way, i'm using a very modified version of this: http://techspot.zzzeek.org/2012/01/11/django-style-database-routers-in-sqlalchemy/ it's been working good

Re: [sqlalchemy] multiple databases?

2013-12-11 Thread Jonathan Vanasco
richard - how are you handle the scoping and management of sessions ? i'm wanting (badly) to convert some twisted code that is using raw sql through their db api onto the sqlalchemy model for my core app. -- You received this message because you are subscribed to the Google Groups sqlalchemy

Re: [sqlalchemy] multiple databases?

2013-12-11 Thread Richard Gerd Kuesters
quite frankly, i'm handling them using deferreds, in a similar way you can find in sqlalchemy-future: https://github.com/lunant/SQLAlchemy-Future with this -- and using scoped sessions based on the callbacks, i can close the session quite nice. the code is very, very ugly for now, but i plan

Re: [sqlalchemy] multiple databases?

2013-12-10 Thread Jameson Lee
If you are using Flask, check out binds[1] with Flask-SQLAlchemy. [1] http://pythonhosted.org/Flask-SQLAlchemy/binds.html On Monday, December 9, 2013 12:33:46 PM UTC-8, warwickp wrote: Hi Richard There are no problems connecting to multiple database sources in the one application - we do

[sqlalchemy] multiple databases?

2013-12-09 Thread Richard Gerd Kuesters
hi all, i don't know if anyone have to go through this, but here's a question: is it possible to use multiple databases sources (like postgres and mysql) in a single application? my best regards, richard. -- You received this message because you are subscribed to the Google Groups

Re: [sqlalchemy] multiple databases?

2013-12-09 Thread Richard Gerd Kuesters
ok, disconsider, i may use mike's session router: http://techspot.zzzeek.org/2012/01/11/django-style-database-routers-in-sqlalchemy/ On 12/09/2013 04:08 PM, Richard Gerd Kuesters wrote: hi all, i don't know if anyone have to go through this, but here's a question: is it possible to use

Re: [sqlalchemy] multiple databases?

2013-12-09 Thread Warwick Prince
Hi Richard There are no problems connecting to multiple database sources in the one application - we do it all the time :-) Cheers Warwick On 10 Dec 2013, at 4:08 am, Richard Gerd Kuesters rich...@humantech.com.br wrote: hi all, i don't know if anyone have to go through this, but here's

[sqlalchemy] multiple databases with same table names not working

2011-11-24 Thread dangel
I have two databases (MySQL and MSSQL) that I'm working with using SQLAlchemy 0.7, the databases share table names and therefore I'm getting an error message when running the code. The error message is : sqlalchemy.exc.InvalidRequestError: Table 'wo' is already defined for this MetaData instance.

Re: [sqlalchemy] multiple databases with same table names not working

2011-11-24 Thread Michael Bayer
On Nov 24, 2011, at 11:29 PM, dangel wrote: I have two databases (MySQL and MSSQL) that I'm working with using SQLAlchemy 0.7, the databases share table names and therefore I'm getting an error message when running the code. The error message is : sqlalchemy.exc.InvalidRequestError:

Re: [sqlalchemy] Multiple databases or multiple schemas?

2010-06-14 Thread Michael Bayer
On Jun 13, 2010, at 4:27 PM, Henry Precheur wrote: I'm starting a new project which is roughly hosting a bunch of sites. I want the sites to be isolated, they'll all have the same schema (data definition), but will store their data on different 'name-spaces'. The front end will be a python

Re: [sqlalchemy] Multiple databases or multiple schemas?

2010-06-14 Thread Henry Precheur
On Mon, Jun 14, 2010 at 01:06:04PM -0400, Michael Bayer wrote: you can do the multi-schema thing using either a PoolListener, or a Table subclass that implements a @property for the schema attribute - in both cases these would be linked to a thread local variable that you would set per

[sqlalchemy] Multiple databases or multiple schemas?

2010-06-13 Thread Henry Precheur
I'm starting a new project which is roughly hosting a bunch of sites. I want the sites to be isolated, they'll all have the same schema (data definition), but will store their data on different 'name-spaces'. The front end will be a python web app. And I'd like to have this application talk to

[sqlalchemy] multiple databases ?

2008-04-22 Thread Lukasz Szybalski
Hello again, So now that I have mssql connection ready and data filtered out and processed I need to save it to a different database. mssql - process data - save to mysql I am wondering how should I create a second database connection? In second database I will create a table and populate the