Files
choriosity-anmeldung/app/api/deps.py
matsewe df2d8f33a5
All checks were successful
release-tag / release-image (push) Successful in 42s
include time restriction
2025-05-26 10:48:10 +02:00

16 lines
317 B
Python

from collections.abc import Generator
from typing import Annotated
from fastapi import Depends
from sqlmodel import Session
from app.core.db import engine
def get_db() -> Generator[Session, None, None]:
with Session(engine) as session:
yield session
SessionDep = Annotated[Session, Depends(get_db)]