Using an external web server
Taipy user interfaces can be served by external servers. This happens in situations where you already have a web application running, and you want to add the GUI capabilities of Taipy to it.
What you need to do in this case is use the flask parameter of the Gui
constructor,
setting it to the instance of the Flask server you are using.
Here is a short code sample that should make this straightforward:
1 2 3 4 5 6 7 8 9 10 11 |
|
The Flask server is created in line 3. Routes and such would be declared as usual (like in lines 6 to 8).
Note how we use the Flask instance to use it in the Gui
constructor in
line 10.
When gui is run (in line 11), Taipy will not create a server of its own. Instead, it will serve your GUI pages using the flask_app server created in line 4.