import flask import feedtools APP = flask.Flask(__name__, static_url_path="", static_folder="static", template_folder="templates") @APP.route("/") def index(): db = feedtools.load() template = flask.render_template( "index.html", feeds=db, ) return template # @APP.route("/API/latest/") # def latest(num): # request = feedtools.latest(num) # return request @APP.route("/API/today/") def today(): request = feedtools.today() return str(request) @APP.route("/API/past/") def past(days): request = feedtools.past(days) return str(request) if __name__ == "__main__": APP.debug = True APP.run(port=5678)