11 lines
284 B
Python
11 lines
284 B
Python
import sqlite3
|
|
from pathlib import Path
|
|
|
|
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)
|