best practise when I want to have a uvicorn server besides with tkinter gui #72
Answered
by
insolor
wanghaisheng
asked this question in
Q&A
|
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 |
Answered by
insolor
Dec 6, 2023
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. |
10 replies
Answer selected by
insolor
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.