This repository has been archived on 2025-07-06. You can view files and clone it, but cannot push or open issues or pull requests.
Files
bolderjara-serviss/backend/db/db.py
2025-07-02 15:32:59 +03:00

12 lines
300 B
Python

# 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