Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

stop flask server

@app.route("/shutdown", methods=['GET'])
def shutdown():
    shutdown_func = request.environ.get('werkzeug.server.shutdown')
    if shutdown_func is None:
        raise RuntimeError('Not running werkzeug')
    shutdown_func()
    return "Shutting down..."
Comment

PREVIOUS NEXT
Code Example
Python :: nltk 
Python :: print data type array 
Python :: downgrade python version windows 
Python :: tqdm 2 progress bars 
Python :: check if 2 strings are equal python 
Python :: move object towards coordinate slowly pygame 
Python :: x y coordinates in python 
Python :: edit path variable using python 
Python :: numpy python 3.10 
Python :: session in django 
Python :: add elements to list python 
Python :: dict to string 
Python :: how to use sort in python 
Python :: python find if string contains space 
Python :: python write into a file 
Python :: HTML template with Django email 
Python :: run python version from terminal 
Python :: python decision tree classifier 
Python :: Add two numbers as a linked list 
Python :: chatterbot python 
Python :: join in pathlib path 
Python :: how to use information from env variables in python 
Python :: can a function output be save as a variable python 
Python :: function in python 
Python :: how to submit two forms in django 
Python :: what is python -u 
Python :: how to iterate set in python 
Python :: convert number to reversed array of digits python 
Python :: sys.maxsize() in python 
Python :: Python How to convert a string to the name of a function? 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =