Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from fastapi import FastAPI
|
| 2 |
+
|
| 3 |
+
app = FastAPI()
|
| 4 |
+
|
| 5 |
+
@app.get("/")
|
| 6 |
+
def root():
|
| 7 |
+
return {"Hello": "World!"}
|
| 8 |
+
|
| 9 |
+
@app.post("/greet")
|
| 10 |
+
def greet(data:dict):
|
| 11 |
+
return {"key":data.get("key","#NOT FOUND")}
|