Skip to content

Instantly share code, notes, and snippets.

@otienoelvis
otienoelvis / csv_to_flask.py
Created June 12, 2024 12:48 — forked from dasdachs/csv_to_flask.py
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