Tracy of AI
8/10/2018 - 1:32 PM

Hello World in flask

Barebones outline of basic flask app

 #Barebones App with JSON output
from flask import Flask, jsonify
app = Flask(__name__)
@app.route('/hello')
def hello():
 return jsonify({"about":'Hello, World!'})
if __name__ == '__main__':
 app.run(debug=True)
#Barebones App
from flask import Flask
app = Flask(__name__)
@app.route('/hello')
def hello():
 return 'Hello, World!'
if __name__ == '__main__':
 app.run(debug=True)