There is a route, if a request whose method should be called draw()
which in turn draws the picture using the Pillow library.
The problem is that all the rendering takes about 10 seconds (especially the drivers of e-ink display)
from draw import Drawing @app.route(api_url('/'), methods=['POST']) def router(route): try: req_data = request.json if route == 'weather': Drawing().draw() return jsonify(status='Draw'), 200 else: return abort(404) except Exception as e: logError(e) return abort(400)
The question is how to call a method to start rendering and not waiting for an answer this method to return the response in json