Files
co_app/app/db.py
2025-12-03 22:03:15 +01:00

13 lines
299 B
Python

import sqlite3
from pathlib import Path
import bcrypt
BASE_DIR = Path(__file__).resolve().parent.parent
DB_PATH = BASE_DIR / "data" / "app.db"
def get_conn():
# check_same_thread=False, damit Streamlit mehrere Threads nutzen kann
return sqlite3.connect(DB_PATH, check_same_thread=False)