creating a quick flask web app tutorial code example
Example: python basic flask app
# Imports necessary libraries
from flask import Flask
# Define the app
app = Flask(__name__)
# Get a welcoming message once you start the server.
@app.route('/')
def home():
return 'Home sweet home!'
# If the file is run directly,start the app.
if __name__ == '__main__':
app.run(Debug=True)
# To execute, run the file. Then go to 127.0.0.1:5000 in your browser and look at a welcoming message.