Add sidebar builder

This commit is contained in:
handi
2025-12-04 22:08:15 +01:00
parent e2d96c712e
commit 3c0e58dfc1
6 changed files with 138 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
import sqlite3
from pathlib import Path
import bcrypt
import pandas as pd
BASE_DIR = Path(__file__).resolve().parent.parent
DB_PATH = BASE_DIR / "data" / "app.db"
@@ -10,3 +11,7 @@ def get_conn():
# check_same_thread=False, damit Streamlit mehrere Threads nutzen kann
return sqlite3.connect(DB_PATH, check_same_thread=False)
def get_list(sql, params=None):
conn = get_conn()
df = pd.read_sql_query(sql, conn, params=params)
return df