def createLinePlot(): if (request.method == 'POST'): data = request.get_json() startDate = data['startDate'] endDate = data['endDate'] period = int(data['period']) plotCreator = Plot() graphJSON = plotCreator.createLinePlot(startDate, endDate, 'abc', period) print(request.url) #localhost:5000/electric/pattern return graphJSON