rest - Python Flask persistent object between requests -
i creating web interface omxplayer on raspberry pi. i'm trying create more rest api controlling video while playing. issue i'm having how control video while playing. currently can create player object methods available start , stop video. @main.route("/video", methods=["get", "post"]) @login_required def video(): form = videoform() if form.validate_on_submit(): url = form.url.data vid_output = form.vid_output.data player = player(url=url, output=vid_output) player.toggle_pause() return redirect('/video') return render_template("video.html", form=form) now want have url can run player.toggle_pause() method again. @main.route("/video/stop", methods=["get", "post"]) @login_required def video_stop(): player.toggle_pause() my problem cannot find way have object persist between 2 requests. video start playing after sending first re...