
- Set up project structure with app modules - Configure SQLite database connection - Set up Alembic for database migrations - Implement Item model with CRUD operations - Create API endpoints for items management - Add health check endpoint - Add API documentation - Add comprehensive README
27 lines
467 B
Python
27 lines
467 B
Python
"""
|
|
API endpoints for health checks.
|
|
"""
|
|
from typing import Any
|
|
|
|
from fastapi import APIRouter
|
|
|
|
from app.schemas.health import HealthCheck, HealthStatus
|
|
|
|
router = APIRouter()
|
|
|
|
# Get the version from the package
|
|
VERSION = "0.1.0"
|
|
|
|
|
|
@router.get("/", response_model=HealthCheck)
|
|
def health_check() -> Any:
|
|
"""
|
|
Health check endpoint.
|
|
|
|
Returns:
|
|
Health status
|
|
"""
|
|
return {
|
|
"status": HealthStatus.OK,
|
|
"version": VERSION,
|
|
} |