Registry / database / django-redis-sessions

django-redis-sessions

JSON →
library0.6.2pypypiunverified

A Redis session backend for Django, providing high-performance session storage. Current version is 0.6.2, released in 2017. The project is in maintenance mode with no recent updates.

pip install django-redis-sessions
INSTALL
IMPORT
SIG · DJANGO-REDIS-SESSI
D
django-redis-sessions
databasepythonv0.6.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SessionStore
from redis_sessions.session import SessionStore
from redis_sessions.session import SessionStore

Configure Django to use Redis sessions by setting SESSION_ENGINE and optionally SESSION_REDIS dict. Ensure redis is running.

# In settings.py SESSION_ENGINE = 'redis_sessions.session' # Optional Redis connection settings (use env vars for secrets) SESSION_REDIS = { 'host': os.environ.get('REDIS_HOST', 'localhost'), 'port': 6379, 'db': 0, 'password': os.environ.get('REDIS_PASSWORD', ''), 'prefix': 'session', 'socket_timeout': 1 }
Debug
Known issues
gotchaSESSION_REDIS must be a dict, not a string. If you set SESSION_REDIS as a Redis URL string (e.g., 'redis://...'), it will be ignored silently and fall back to defaults.
fix
Use dict format: SESSION_REDIS = {'host': ..., 'port': ..., ...}
affects: all
deprecatedDjango versions 4.x and later removed the PREFERRED_SESSION_COOKIE_SALT setting; if using combined with sessions_cached_db, be aware of changes in session backend.
fix
For Django 4+, ensure you have no deprecated settings; test session behavior.
affects: 0.6.x
gotchaThe prefix option in SESSION_REDIS does not support nested keys; if you use colons in prefix (e.g., 'project:session'), it will be treated as literal. May cause namespace collisions.
fix
Use simple prefix without colons or use a separate Redis db.
affects: all
breakingIn version 0.6, the configuration changed from separate settings (SESSION_REDIS_HOST, etc.) to a single SESSION_REDIS dict. Old settings are not automatically migrated.
fix
Replace SESSION_REDIS_HOST, SESSION_REDIS_PORT, etc. with SESSION_REDIS = {'host': ..., 'port': ...}
affects: 0.5.x to 0.6
Upgrade
Version history
0.6.2latest on PyPI · released Jan 13, 2021
Audit
Dependencies
djangorequiredRequired as the session framework
redisrequiredPython Redis client
Agent activity
19 hits · last 30 days
node
18
Resources
django-redis-sessions — pip install django-redis-sessions · libregistry