As it was advice me to do on an early post, to do an web server with an public api. Basically I want to do an app that will run on windows and will get the data from the API.
from flask import Flask, render_template, request import sqlite3 as sql
app = Flask(__name__)
files_from_database = []
@app.route('/')
def getdata():
con = sql.connect("AntiCheat.db")
con.row_factory = sql.Row
cur = con.cursor()
cur.execute("select filename from files")
rows = cur.fetchall();
for row in rows:
files_from_database.append(row)
return render_template("list.html", rows=files_from_database)
if __name__ == '__main__':
app.run(debug=True)
I'm just starting now, I don't know if is right or not, if can someone please tell me if I'm going in the right way or if there is a better way to do it
and how the windows app can connect to that API and fetch the array's data?
Thanks in advance