From ecb4b4c8c56d9f720ba004fcfefd40acb996cc7e Mon Sep 17 00:00:00 2001 From: Rasmus Luha Date: Wed, 16 Mar 2022 23:13:48 +0200 Subject: Fixing comments and documentation --- API/main.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'API/main.py') 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(): -- cgit v1.2.3