Flask-OldSessions

Flask-OldSessions is an extension to Flask that reimplements the old pickle based session interface from Flask 0.9 and earlier for backwards compatibility reasons.

Installation

Install the extension with one of the following commands:

$ pip install Flask-OldSessions

Alternatively, use easy_install:

$ easy_install Flask-OldSessions

Usage

To use this session interface with Flask you can use it to replace the one that comes by default. Just import the OldSecureCookieSessionInterface and attach it to the application:

from flask import Flask
from flask_oldsessions import OldSecureCookieSessionInterface

app = Flask(__name__)
app.session_interface = OldSecureCookieSessionInterface()

API Reference

class flask_oldsessions.OldSecureCookieSessionInterface

The cookie session interface that uses the Werkzeug securecookie as client side session backend.

session_class

alias of OldSecureCookieSession

class flask_oldsessions.UpgradingSessionInterface(old_interface=None, new_interface=None)

A session interface that upgrades from one session system to another one.

Parameters:
Fork me on GitHub