Spaces:
Sleeping
Sleeping
File size: 445 Bytes
bf6d237 828101b bf6d237 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
from typing import Literal
from fastapi import APIRouter
from pydantic import BaseModel, Field
# Not authentication or authorization required to get the health status.
health_router = APIRouter()
class HealthResponse(BaseModel):
status: Literal["ok"] = Field(default="ok")
@health_router.get("/v1/health", tags=["Health"])
def health() -> HealthResponse:
"""Return ok if the system is up."""
return HealthResponse(status="ok")
|