best practise when I want to have a uvicorn server besides with tkinter gui #72
-
how to integrate this wonderful lib with my need I want to start a fastapi server in the background for files upload task and have tkinter gui do other tasks. and if I hit the quit menu in the system tray after close gui windows, it should exit both tkinter and fastapi server. my code kinda of freezing tkinter though
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
I'd suggest you not to put everithing in one application. Just make the server a separate application and run it from the GUI using subprocess (asyncio subprocess in this case). When the gui app shut down, also shut down the fastapi service. |
Beta Was this translation helpful? Give feedback.
I'd suggest you not to put everithing in one application. Just make the server a separate application and run it from the GUI using subprocess (asyncio subprocess in this case). When the gui app shut down, also shut down the fastapi service.