
- Set up project structure - Created Task model with SQLAlchemy - Implemented SQLite database connection - Created Alembic migrations - Added Task CRUD endpoints - Added health endpoint - Updated README with project details generated with BackendIM... (backend.im)
11 lines
180 B
Python
11 lines
180 B
Python
from typing import Generator
|
|
|
|
from app.db.session import SessionLocal
|
|
|
|
|
|
def get_db() -> Generator:
|
|
db = SessionLocal()
|
|
try:
|
|
yield db
|
|
finally:
|
|
db.close() |