Released a pluggable application "django-multi-sessions"

This application provides interfaces for multi-session backend. Basically designed to transfer sessions from one machine to another, without stopping your sessions.
Current version is 0.0.3
Installation from PyPI:
pip install django-multi-sessions
Or manual installation:
Download tarball, extract and run:
python setup.py install
Settings
You need specify in settings.py a “multi_sessions.session” as SESSION_ENGINE and fill the SESSION_MULTISESSIONS_POOL, as in example:
SESSION_ENGINE = "multi_sessions.session"
SESSION_MULTISESSIONS_POOL = (
{
"backend": "redis_sessions.session",
"modes": ["read", "write", "delete"]
},
{
"backend": "django.contrib.sessions.backends.db",
"modes": ["read", "delete"]
},
)
In this example the “redis-session” is using as a priority storage (read, write/create, delete), and “database-backend” is using only for reads and delete a sessions, because we migrate to “redis”, and is no meaning in store data in “database-backend”.
Sources
This application is open source, and you can getting source code from https://github.com/adw0rd/django-multi-sessions
Comments are closed. Read the original discussion in Russian →