added van api and front end

This commit is contained in:
2026-03-07 16:19:39 -05:00
parent e893ea0f57
commit bd490334f5
15 changed files with 807 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
"""FastAPI dependencies for van inventory."""
from collections.abc import Iterator
from typing import Annotated
from fastapi import Depends, Request
from sqlalchemy.orm import Session
def get_db(request: Request) -> Iterator[Session]:
"""Get database session from app state."""
with Session(request.app.state.engine) as session:
yield session
DbSession = Annotated[Session, Depends(get_db)]