초기 커밋
This commit is contained in:
12
app/api/deps.py
Normal file
12
app/api/deps.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import AsyncGenerator
|
||||
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from app.db.mariadb import get_db
|
||||
|
||||
|
||||
async def get_session() -> AsyncGenerator[AsyncSession, None]:
|
||||
async for session in get_db():
|
||||
yield session
|
||||
Reference in New Issue
Block a user