File size: 252 Bytes
6e7460b
 
 
 
 
 
 
247bdcb
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from fastapi import FastAPI

app = FastAPI()

@app.get("/")
def greet_json():
    return {"Hello": "World!"}

@app.get("/text")
def greet_text():
    return "Hello Akanksh B C!"

@app.post("/sum")
def sum_numbers(a: int, b: int):
	return {"sum": a + b}