skillfed

pyramid-session-redis

High performance and actively maintained server-side session framework for Pyramid and Redis.

pyramid-session-redis v1.8.1 80.0K downloads/30d#14,326 on PyPI17
Permissive license BSD AGING released

What it is and what it does

pyramid_session_redis is a Pyramid web framework plugin that stores user sessions in Redis instead of in-process or cookies. It was originally forked from pyramid_redis_sessions to optimize for high-traffic deployments by reducing Redis communication overhead and supporting flexible timeout strategies. The package manages both session timeouts (inactivity-based, with configurable refresh triggers) and cookie expiry separately, allowing fine-grained control over session lifecycle.

The library depends on redis, pyramid, zope.interface, and typing_extensions. It supports Python 3.7+ with Pyramid 2.0 on the current branch, though older 1.6.x releases support Python 2 and Pyramid 1.x. The package uses semantic versioning with minor versions potentially containing small breaking changes announced via deprecation warnings. Session payload format changed significantly in version 1.4, making old 1.2.x sessions incompatible.

Use it for:

  • Store user sessions in Redis for multi-server Pyramid deployments where in-process memory is not shared
  • Implement session timeout with activity-based refresh to balance security and user experience in high-traffic sites
  • Migrate from pyramid_redis_sessions with minimal code changes while gaining performance optimizations
  • Configure Redis-managed session expiry to offload timeout logic from application code
  • Support graceful session handling across Pyramid application restarts without losing user state

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides server-side session storage for Pyramid web applications using Redis as the backend, with optimizations for high-traffic deployments.

Yes, with conditions. The package is stable and actively maintained (recent commits, no known vulnerabilities), but install friction is high due to multiple dependencies and the requirement for a running Redis server. It is well-suited for multi-server Pyramid deployments or high-traffic applications where session management performance matters. Not recommended for simple single-server applications where in-process sessions suffice. The aging maintenance status (291 days since release) is not a blocker but warrants monitoring if you depend on frequent updates.

Install

pyramid-session-redis on PyPI

pip

pip install pyramid-session-redis

uv

uv add pyramid-session-redis

poetry

poetry add pyramid-session-redis

Installing pyramid-session-redis

Before you install

High install friction due to 4 runtime dependencies including redis and pyramid. Maintenance status is aging—last release was 291 days ago, though the repository remains active with a recent commit on 2025-11-07. The 1.8 branch targets Python 3.7+ and Pyramid 2.0; earlier 1.6 branch supports Python 2 and Pyramid 1.x but is in maintenance mode.

License in practice

Licensed under BSD (permissive), which allows commercial and private use with minimal restrictions. No notable licensing constraints for adoption.

Quickstart

pip install pyramid-session-redis redis pyramid

from pyramid.config import Configurator
from pyramid_session_redis import session_factory_from_settings

config = Configurator()
session_factory = session_factory_from_settings(settings)
config.set_session_factory(session_factory)

Requires a running Redis server. The package requires Python 3.7+ for the main branch (1.7+) and Pyramid 2.0; the 1.6 branch supports older Python 2 and Pyramid 1.x but is in maintenance mode only.

Verify before relying

  • Whether the aging maintenance status (291 days since last release) affects production readiness for new deployments
  • Performance improvements over the original pyramid_redis_sessions in real-world high-traffic scenarios
  • Compatibility and migration path for applications currently on the 1.6 branch moving to 1.8

Package facts

License BSD (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies 4 — redis, pyramid, zope.interface, typing_extensions
Maintenance aging — 291 days since the last release
Last repo commit
First released
Downloads 79,996/month — #14,326 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyramid_session_redis-1.8.1.tar.gz

Keywords: pyramid, session, redis

Framework :: PyramidIntended Audience :: DevelopersProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

pyramid session management redisserver-side sessions pyramidredis session storagepyramid web framework sessionshigh-performance session handling
session-managementredis-backendpyramid-plugin

More Dynamic Content packages