How to connect to multiples databases on flask_tryton

Hi. I am working with flask tryton and I get success to connect to a single tryton database and retrive some data from some models.

Now I want to connect to multiple databases and get the same data from each one of them at the same time, so I can perform some indicator to a dashboard.

Is there anyway to connect to multiple databases at the same time? If so, is there any example of how to do it?


flask-tryton was designed to use a single database because we did not want to expose the database name as parameter of the URLs. I do not think it is possible to change that without a complete rewrite.

1 Like

Is it there a way to change the connection from one to another one?

Not without restarting the flask application.