JoeMiNot commited on
Commit
eefea13
·
verified ·
1 Parent(s): b31c299

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
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")}