so I have a server and did an api for it so I can update patch files to my server, however now when I update the some batch files in the server, I always have to stop running the server and than run it again to see the changes, I was wondering what can I do so that my server restart it's self
Yes you can,
Make requests api send a json like {'do': 'refresh_server'}-
then just type exit(), then run the file again using the os module.
Edit: This is solution for windows
How can I restart my server using a request api