16 lines
302 B
Python
16 lines
302 B
Python
|
|
from collections.abc import Generator
|
||
|
|
|
||
|
|
from sqlalchemy.orm import Session
|
||
|
|
|
||
|
|
from app.config import Settings, get_settings
|
||
|
|
from app.db import get_db_session
|
||
|
|
|
||
|
|
|
||
|
|
def get_app_settings() -> Settings:
|
||
|
|
return get_settings()
|
||
|
|
|
||
|
|
|
||
|
|
def get_db() -> Generator[Session, None, None]:
|
||
|
|
yield from get_db_session()
|
||
|
|
|