Skip to content

An attempt to standardize session handling across various services (Django and Flask for now)

License

Notifications You must be signed in to change notification settings

pnegahdar/centralsession

Repository files navigation

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)

About

An attempt to standardize session handling across various services (Django and Flask for now)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published