Tablib, Flask, and Openshift

  |   Source

Tablib, Flask, and Openshift!

Check out the web-app here!

Source Code <- Forked from Ryan Jarvinen's flask-base

Flask

Tablib

Openshift

In [ ]:
from flask import Flask, render_template, request
import tablib


app = Flask(__name__)
app.config.from_pyfile('flaskapp.cfg')


@app.route('/')
def index():
    return render_template('index.html')


@app.route('/upload', methods=['POST'])
def upload():
    table = tablib.Dataset()
    uploaded_file = request.files['file']
    table.csv = uploaded_file.read()
    return table.html


if __name__ == '__main__':
    app.run()
Comments powered by Disqus