Fetched users with python

This commit is contained in:
Leons Aleksandrovs
2025-07-02 15:32:59 +03:00
parent 9803b5b35d
commit d72735e416
7 changed files with 46 additions and 0 deletions

11
backend/db/db.py Normal file
View File

@@ -0,0 +1,11 @@
# This file is for database connection
import sqlite3
# Create the connection once, reuse it
# Check same thread is false, because we fast api runs on multiple threads
conn = sqlite3.connect("db/attendance.db", check_same_thread=False)
conn.row_factory = sqlite3.Row
def get_db():
return conn