Skip to content

Instantly share code, notes, and snippets.

View miguelcamposfernandes's full-sized avatar
👋
Hi!

miguelcamposfernandes

👋
Hi!
  • Lisbon, Portugal
View GitHub Profile
@dasdachs
dasdachs / csv_to_flask.py
Created July 24, 2016 13:14
Upload, read and save the content of a csv file to your model
#!/usr/bin/env python
from io import TextIOWrapper
import csv
from flask import Flask, request, redirect, url_for
from flask_sqlalchemy import SQLAlchemy
# Create Flaskk app, config the db and load the db object
# http://flask-sqlalchemy.pocoo.org/2.1/quickstart/#a-minimal-application