I have associated multiple engines with a SQLAlchemy Object. To use sessionmaker
to create sessions I need to get the right engine
. When I try db.engine (db is my SQLAlchemy object), I get the default engine. How do I get the other associated engines? I would prefer if I could give a key and get the right engine.
I used Flask's SQLALCHEMY_BINDS
to associate more than one engine.