centralsession

A redis based session storage that works for flask and django


Keywords
flask, django, sessions, session, central
License
MIT
Install
pip install centralsession==0.3.0

Documentation

CentralSession

Build Status Coverage Status

Service architecture needs a centralized session store for various frameworks and languages.

The app is designed to be pluggable with new frameworks etc and is backed by redis.

Note since this only currently supports a cache backend hmac signing as needed with traditional cookie based storage is unnecessary

Usage

Django

Install

pip install centralsession

Settings.py

INSTALLED_APPS += ('centralsession',)

CENTRAL_SESSION_KEY_PREFIX = 'centralsession'
CENTRAL_SESSION_REDIS_URI = 'redis://localhost:6379'
SESSION_ENGINE = 'centralsession.django_session'

Flask

Install

pip install centralsession

Config:

from centralsession import flask_session
redis_uri =  'redis://localhost:6379/0'
app.session_interface = flask_session.CentralSessionInterface(redis_uri)