sohom004 commited on
Commit
aba90b6
·
verified ·
1 Parent(s): 18e34ae

Update app.py

Browse files

/health end-point added

Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -1,7 +1,13 @@
 
 
1
  from fastapi import FastAPI
2
 
3
  app = FastAPI()
4
 
5
  @app.get("/")
6
  def greet_json():
7
- return {"Hello": "World!"}
 
 
 
 
 
1
+ import os
2
+ #
3
  from fastapi import FastAPI
4
 
5
  app = FastAPI()
6
 
7
  @app.get("/")
8
  def greet_json():
9
+ return {"Hello": "World!", "cpu_count": os.cpu_count()}
10
+
11
+ @app.get("/health")
12
+ def health():
13
+ return "ok"