How does python SQLalchemy bind multiple databases, but use one session, similar to flask_sqlalchemy?

clipboard.png

like this, if you want to solve the problem through a session instead of calling a different session to connect to the database, it feels a bit troublesome

Apr.26,2021

Huh? Isn't the example in your figure that executes different functions and returns different session? Isn't the sqlalchemy in flask the same as the sqlalchemy installed by python itself.?

Menu