https://flask-httpauth.readthedocs.io/en/latest/
Flask FrameworkのHttp認証用
from flask import Flask,render_template from flask_httpauth import HTTPBasicAuth import sqlite3 app=Flask(__name__) auth=HTTPBasicAuth() users={ "root":"root", "oper":"1234" } @auth.get_password def get_pw(username): if username in users: return users.get(username) return None @app.route("/") @auth.login_required def index(): return "Hello!"+auth.username if __name__=='__main__': app.run(port=5001)