chore: Update dependencies and task list

This commit is contained in:
2025-11-16 18:27:38 +01:00
parent 56bf044bb6
commit 1186c91dcf
4 changed files with 54 additions and 6 deletions

19
database.py Normal file
View File

@@ -0,0 +1,19 @@
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
# Define the location of our SQLite database file.
# The ./. indicates it will be in the same directory as our project.
SQLALCHEMY_DATABASE_URL = "sqlite:///./multichat_overlay.db"
# Create the SQLAlchemy engine. The `connect_args` is needed only for SQLite
# to allow it to be used by multiple threads, which FastAPI does.
engine = create_engine(
SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False}
)
# Each instance of SessionLocal will be a database session.
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
# This Base will be used by our model classes to inherit from.
Base = declarative_base()