Start the process of making HTTP requests aync

This commit is contained in:
Edward Betts 2023-11-05 14:40:02 +00:00
parent 0a39c4dbbe
commit 144e8337b8
4 changed files with 23 additions and 13 deletions

View file

@ -45,10 +45,10 @@ def exception_handler(e: werkzeug.exceptions.InternalServerError) -> tuple[str,
@app.route("/")
def index() -> str:
async def index() -> str:
"""Index page."""
now = datetime.now()
data = get_data(now)
data = await get_data(now)
return flask.render_template("index.html", today=now.date(), **data)