diff options
author | Rasmus Luha <rasmus.luha@gmail.com> | 2022-03-16 23:13:48 +0200 |
---|---|---|
committer | Rasmus Luha <rasmus.luha@gmail.com> | 2022-03-16 23:13:48 +0200 |
commit | ecb4b4c8c56d9f720ba004fcfefd40acb996cc7e (patch) | |
tree | c53e0de7e1e08cccdcc07f2a0a4408ecdf26cbf4 /API/main.py | |
parent | 03aaa6978fbd73c13b63f0c525f01189c67d0f1f (diff) |
Fixing comments and documentation
Diffstat (limited to 'API/main.py')
-rw-r--r-- | API/main.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/API/main.py b/API/main.py index 3816fab..c67c95b 100644 --- a/API/main.py +++ b/API/main.py @@ -1,9 +1,14 @@ from fastapi import FastAPI import pandas as pd import numpy as np +import os + +import sys +sys.path.append("--") app = FastAPI() + # Making relative paths for the data, on windows slashes would have to be turned around. # It is probably not the best way. relPathTeams = "../AllAboutData/Data/NBAteams.csv" @@ -20,6 +25,17 @@ def getTeamNames(): +@app.get("/") +def getIndex(): + return {"Message" : "Hello!"} + + +#@app.get("/sync") +#def syncPlayers(): # Currnetly only works for Unix type systems, which is not good +# os.system("rm " + relPathPlayers + "*") +# getData.getPlayerData(getData.url, getData.headers) + + @app.get("/teams") def getTeams(): |