Session is a Session Managment Plugin to improve your Session Managment in Flask, to set it up you just have to initialize it with a token and assign it to the default session object in flask, here's an example:
import sessionOffedul
from flask import Flask, session
app = Flask(name)
@app.route("/")
def init():
sessionOffedul.InitializeSession("your token goes here")
session['session'] = sessionOffedul.GetSession()
pip install sessionOffedul==0.4
sessionOffedul.CreateObject("selection", "top", str)
sessionOffedul.CreateObject("selection", ["top", "left", "right"], list)
sessionOffedul.CreateObject("selection", 43, int)
sessionOffedul.CreateObject("selection", {"faces": ['top': false, 'right': false]}, tuple)
Once you add an object to the session you must remember to update the session, to do so follow the following example:
sessionOffedul.UpdateSession()
session['session'] = sessionOffedul.GetSession()
With PrintContentOnFile function you can write on a file the prettified json on a file, oh did I mention it? This plugin supports json! You can load objects with a json format, to do so, follow the example:
jsonExample = {
"name": "selection",
"value": "top",
"type": "String"
}
obj = sessionOffedul.ConvertJsonToObject(jsonExample)
sessionOffedul.AddJson(obj)