From 328bc5029631b865f35125cc5ee9b37cd6d612d6 Mon Sep 17 00:00:00 2001 From: craisin Date: Thu, 27 Nov 2025 16:57:25 -0800 Subject: [PATCH] start framework --- allfence.py | 16 ++++++++++++++++ app.py | 14 +++++++++----- 2 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 allfence.py diff --git a/allfence.py b/allfence.py new file mode 100644 index 0000000..39de709 --- /dev/null +++ b/allfence.py @@ -0,0 +1,16 @@ +from hashlib import sha256 + +def create_user(db, login_info, user_info): + pass + +def update_user(db, login_info, user_info): + pass + +def create_event(db): + pass + +def finish_event(db, event): + pass + +def create_tournament(db, events): + pass \ No newline at end of file diff --git a/app.py b/app.py index bd64123..383c281 100644 --- a/app.py +++ b/app.py @@ -1,15 +1,19 @@ +import allfence as af from flask import Flask import psycopg2 as sql HOST, PORT = "0.0.0.0", 8000 app = Flask(__name__) -sql.connect( - dbname="database", - user="user", - password="password", - host="localhost" +DB_NAME, USER, PASSWORD, HOST, PORT = "database", "user", "password", "localhost", "5432" +db_connection = sql.connect( + dbname=DB_NAME, + user=USER, + password=PASSWORD, + host=HOST, + port = PORT ) +db_cursor = db_connection.cursor() @app.route("/") def index():