What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-05 11:34:08
simple flask app
# Extremely simple flask application, will display 'Hello World!' on the screen when you run it # Access it by running it, then going to whatever port its running on (It'll say which port it's running on). from flask import Flask app = Flask(__name__) @a... Add solution -
Python 2021-11-03 05:32:08
flask site route
from flask import render_template @app.route('/hello/') @app.route('/hello/<name>') def hello(name=None): return render_template('hello.html', name=name) --------------------------------------------------- <!doctype html> <title>... Add solution -
Python 2021-11-02 19:46:23
how to monitor a website traffic python
from flask import Flask, render_template, request, session, jsonify import urllib.request from pusher import Pusher from datetime import datetime import httpagentparser import json import os import hashlib from dbsetup ... Add solution -
Html 2021-10-29 09:23:06
flask pandas dataframe to html table pdf
from flask import * import pandas as pd app = Flask(__name__) @app.route("/tables") def show_tables(): data = pd.read_excel('dummy_data.xlsx') data.set_index(['Name'], inplace=True) data.index.name=None females = data.loc[data.G... Add solution -
Python 2021-10-26 07:33:07
NameError: name 'request' is not defined
from flask import request Add solution -
Python 2021-10-25 11:07:11
flask exception handler
'''Application error handlers.''' from app.models.s3 import S3ClientError from app.models.threatstack import ThreatStackError from flask import Blueprint, jsonify errors = Blueprint('errors', __name__) @errors.app_errorhandler(S3ClientError) @errors.app... Add solution -
Python 2021-10-21 06:57:04
create internal etl for people to upload data with python and flask
from flask import Flask, render_template, requestfrom werkzeug import secure_filenameapp = Flask(__name__)@app.route('/upload')def upload_file(): return render_template('upload.html') @app.route('/uploader', methods = ['GET', 'POST'])def upload_file(): ... Add solution