Skip to main content

splent_feature_session_redis

Server-side sessions in Redis for SPLENT products, through Flask-Session (config archetype). It is one of the session backends a product picks from; splent_feature_session_filesystem is the other. It requires splent_feature_redis, which runs the Redis server and says how to reach it.

What it does

When the app starts it sets Flask-Session to keep sessions in Redis:

  • SESSION_TYPE = "redis" and SESSION_REDIS, a client for REDIS_SESSION_URL: the server splent_feature_redis configures, with its password, on the database it keeps for sessions. Tasks and anything else stored in Redis live in other databases, so they never mix with sessions.
  • SESSION_PERMANENT = False, so a session ends with the browser unless a feature asks for more.
  • SESSION_KEY_PREFIX = "<product>:" and SESSION_COOKIE_NAME = "<product>_session", taken from SPLENT_APP. Two products served from the same host share cookies and may share one Redis, and the prefix and the cookie name keep their sessions apart.

Configuration

Where the sessions live is splent_feature_redis's to decide, so it is configured there: REDIS_URL, REDIS_PASSWORD and REDIS_SESSION_DB. This feature reads the result from app.config, never from the environment.

Setting Source Purpose
REDIS_SESSION_URL app.config, from splent_feature_redis Where the sessions are stored, password and database included.
REDIS_URL app.config, from splent_feature_redis Used when REDIS_SESSION_URL is missing, which is what splent_feature_redis 1.5 and earlier provide.
SPLENT_APP environment, else the app's package name Product name used in the key prefix and the cookie name.

With neither URL in the configuration the app does not start, and the error names the missing feature. A guessed default would only move the failure to the first request.

Tests

splent feature:test splent_feature_session_redis

The unit tests run inject_config against a bare Flask app with a mocked Redis client, so no server is needed. One runs splent_feature_redis's inject_config first, with the sessions on a database other than 0, so the two features cannot disagree on a key name without a test failing. Against a splent_feature_redis without a database per use (1.5), it is skipped.

Metadata

Release files for splent-feature-session-redis 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for splent-feature-session-redis 1.2.0
File Size Uploaded Provenance Actions
splent_feature_session_redis-1.2.0.tar.gz 18.3 kB Without provenance Details for splent_feature_session_redis-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for splent-feature-session-redis 1.2.0
File Interpreter ABI Platform Actions
splent_feature_session_redis-1.2.0-py3-none-any.whl Python 3 none any Details for splent_feature_session_redis-1.2.0-py3-none-any.whl

Total release size: 37.2 kB

Release files / splent_feature_session_redis-1.2.0.tar.gz

Download URL splent_feature_session_redis-1.2.0.tar.gz
Size 18.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3e61e3e8c1a5f3122bbefe18e2d6b9dca0149965356720b3ef20b9b5f5948065
BLAKE2b-256 checksum
How to use checksums
e00a0b166d32506f916415d0fe837925db26bf33443c7d86252ba604b22ca975
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.16

Release files / splent_feature_session_redis-1.2.0-py3-none-any.whl

Download URL splent_feature_session_redis-1.2.0-py3-none-any.whl
Size 18.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
12ab41c656d61709d80a8e782edb7fb16b5eab6095cec9a52439a2249f04eb0e
BLAKE2b-256 checksum
How to use checksums
0174a6a2c84f95a1feb51ca7ec144285ee11d5ef139f3563f3616de224468945
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.16

Security for splent-feature-session-redis 1.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page