import queue from flask import Flask, render_template, request, make_response, session from flask_socketio import SocketIO, join_room, leave_room #https://pythonprogramminglanguage.com/python-flask-websocket/ from flask_session import Session import sqlite3 import time import atexit import sys import uuid db_path = 'mate.db' conn = sqlite3.connect(db_path, check_same_thread=False) c = conn.cursor() app = Flask(__name__) key = str(uuid.uuid4().hex) app.config['SESSION_TYPE'] = 'filesystem' print(key) app.config['SECRET_KEY'] = key Session(app) socketio = SocketIO(app) status = True users = queue.Queue() finished = None def exit_handler(): conn.close() sys.exit("Program sucsesfully exited") #website @app.route("/") def index(): return 'user and tag list
The creator of this website accepts no liability for any linguistic or technical errors!
' @app.route("/list") def list(): c.execute("SELECT * FROM users") users = c.fetchall() text = "" for i in users: text = text + f'{i[1]}: {i[2]}