79368796

Date: 2025-01-19 10:49:29
Score: 1
Natty:
Report link

You are using SessionLocal() in Depends() they are not designed for async sessions. Try something like the following:

async def get_db():
    async with SessionLocal() as session:
        yield session

async def read_root(db: AsyncSession = Depends(get_db)):
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: htrehrthtr