Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Does Quart load Jinja templates asynchronously? #397

Unanswered
jakubsvehla asked this question in Q&A
Discussion options

Hi! I have looked into the source code and it seems that Jinja templates are loaded from the filesystem synchronously and blocking the async loop (which would kind of defeat the purpose of having an async framework), is that right? If so, is there a way to load the templates asynchronously and not block the loop?

You must be logged in to vote

Replies: 1 comment

Comment options

I haven't looked at the source code of Quart but rendering a template is typically done with await as shown below which suggests that they are loaded asynchronously.

from quart import render_template
@app.route("/hello")
async def hello():
 return await render_template("index.html")
You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /