Major: Restructure of Project

Major: Introduction of Frontend (React)
This commit is contained in:
Chris-1010
2025-01-21 17:19:23 +00:00
parent 76991f0b39
commit 2887409ae6
92 changed files with 4924 additions and 18341 deletions

View File

@@ -0,0 +1,22 @@
import sqlite3
import os
class Database:
def __init__(self) -> None:
self._db = os.path.join(os.path.abspath(os.path.dirname(__file__)), "app.db")
def create_connection(self) -> sqlite3.Cursor:
conn = sqlite3.connect(self._db)
conn.row_factory = sqlite3.Row
self._conn = conn
cursor = conn.cursor()
return cursor
def commit_data(self):
try:
self._conn.commit()
except Exception as e:
print(e)
def close_connection(self) -> None:
self._conn.close()