first commit
This commit is contained in:
10
app/db/session.py
Normal file
10
app/db/session.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from sqlmodel import create_engine, Session
|
||||
from app.core.config import settings
|
||||
|
||||
|
||||
engine = create_engine(settings.DATABASE_URL, echo=False)
|
||||
|
||||
|
||||
def get_session() -> Session:
|
||||
with Session(engine) as session:
|
||||
yield session
|
||||
Reference in New Issue
Block a user