flask.Flask.save_session

Flask.save_session(session, response)[source]

Saves the session if it needs updates. For the default implementation, check open_session(). Instead of overriding this method we recommend replacing the session_interface.

Parameters:
  • session – the session to be saved (a SecureCookie object)
  • response – an instance of response_class