From dc7101fc5cf80ea71c872219bb6c34ebdc2064ea Mon Sep 17 00:00:00 2001 From: Sivesh Kumar Date: Fri, 7 Nov 2025 15:16:05 +0530 Subject: [PATCH] Add small health_status() helper function for FastAPI utils --- fastapi/utils/status_check.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 fastapi/utils/status_check.py diff --git a/fastapi/utils/status_check.py b/fastapi/utils/status_check.py new file mode 100644 index 000000000..b660cea90 --- /dev/null +++ b/fastapi/utils/status_check.py @@ -0,0 +1,15 @@ +from datetime import datetime + +def health_status() -> dict: + """ + Returns a simple health status for FastAPI. + This is a small helper function that could be used in health checks. + """ + return { + "status": "ok", + "time": datetime.utcnow().isoformat() + "Z" + } + + +if __name__ == "__main__": + print(health_status())