Videos1 3 - terryinfcco/python-flask-for-beginners Wiki

Python flask for Beginners 2 hours

Video 3

from flask import Flask
# create the app. very standard terminology 
app = flask (__name__)

@app.route ('/') # decorator to define index page 
def welcome():
    return ('This is my first flask app. Yay!)

# at very end of script 
app.run() 
python app.py

served at localhost:5000

@app.route('/potato')
def potato():
	return( Potato page')
@app,route('/bob')
def bob(): 
	return ('Hi Bob')