From Fedora Project Wiki

< User:Jskladan

Revision as of 15:36, 5 December 2012 by Jskladan (talk | contribs)


Create directory to hold virtualenv

mkdir python_web
cd python_web

Create virtualenv & install flask

python flask
source flask/bin/activate
pip install flask flask-sqlalchemy flask-wtf

Create directory/file structure

mkdir hello_world
cd hello_world
mkdir static templates

HOST = ''
DEBUG = True

Dummy application

Create new file (, and copy/paste the code below. To start the app, just run it as a regular python script.

from flask import Flask

app = Flask(__name__)                                                                       
def index():                                                                                
    return "Hello, World!"                                                                  
if __name__ == '__main__':                                                              = app.config['HOST'], debug = app.config['DEBUG'])