I have a Flask application that calls flask.render_template without problems when it is invoked from a flask http request.
flask.render_template
http request
I need the same
You need to render it in an app context. Import your app in your backend code and do the following.
with app.app_context(): data = render_template(path, **context)