Issue 1: repo scaffold and project structure
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
"""Database engine and session management."""
|
||||
|
||||
from sqlmodel import Session, create_engine
|
||||
|
||||
from ten31portal.config import DB_PATH
|
||||
|
||||
engine = create_engine(f"sqlite:///{DB_PATH}", echo=False)
|
||||
|
||||
|
||||
def get_session():
|
||||
"""FastAPI dependency that yields a database session."""
|
||||
with Session(engine) as session:
|
||||
yield session
|
||||
Reference in New Issue
Block a user