1
0
mirror of https://gitlab.com/2-chainz/2-chainz-rest.git synced 2025-08-05 21:11:35 +00:00

init commit

This commit is contained in:
2020-02-28 19:22:14 -07:00
parent b9981b5771
commit 62b33b8cc4
4 changed files with 41 additions and 0 deletions

17
main.py Normal file
View File

@@ -0,0 +1,17 @@
from fastapi import FastAPI
import json
import random
quotes = json.load(open("quotes.json"))
app = FastAPI()
@app.get("/")
async def quote():
return {"message": random.choice(quotes)}
@app.get("/dump")
async def dump():
return quotes