Spaces:
Running
Running
th commited on
Commit ·
af9f0ec
1
Parent(s): 8d02c0c
Add dedicated /health endpoint for monitoring services
Browse files
app.py
CHANGED
|
@@ -63,9 +63,19 @@ class BirthRequest(BaseModel):
|
|
| 63 |
timezone: Optional[str] = "UTC"
|
| 64 |
|
| 65 |
@app.get("/")
|
| 66 |
-
def
|
| 67 |
return {"status": "online", "service": "Sisi Astrology API"}
|
| 68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
def planet_to_dict(planet_model: Any) -> Dict:
|
| 70 |
"""Convert Kerykeion planet model to dict"""
|
| 71 |
return {
|
|
|
|
| 63 |
timezone: Optional[str] = "UTC"
|
| 64 |
|
| 65 |
@app.get("/")
|
| 66 |
+
def root():
|
| 67 |
return {"status": "online", "service": "Sisi Astrology API"}
|
| 68 |
|
| 69 |
+
@app.get("/health")
|
| 70 |
+
def health_check():
|
| 71 |
+
"""Health check endpoint for monitoring services"""
|
| 72 |
+
return {
|
| 73 |
+
"status": "healthy",
|
| 74 |
+
"service": "Sisi Astrology API",
|
| 75 |
+
"version": "1.0.0",
|
| 76 |
+
"uptime": "ok"
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
def planet_to_dict(planet_model: Any) -> Dict:
|
| 80 |
"""Convert Kerykeion planet model to dict"""
|
| 81 |
return {
|