Implemented login and session functionality, created a database on the backend to store login and stream information

This commit is contained in:
white
2025-01-17 13:55:17 +00:00
parent dcdc8d248f
commit b18624266a
5 changed files with 118 additions and 4 deletions

15
core/database.py Normal file
View File

@@ -0,0 +1,15 @@
import sqlite3
class Database:
def __init__(self, db:str) -> None:
self._db = db
self._conn = None
def create_connection(self) -> sqlite3.Cursor:
conn = sqlite3.connect(self._db)
self._conn = conn
cursor = conn.cursor()
return cursor
def close_connection(self) -> None:
self._conn.close()