--- id: flask-redis version: "0.4.0" license: unclear license_treatment: unclear maintenance: dormant --- # flask-redis — A nice way to use Redis in your Flask app License: unclear · Maintenance: dormant · Downloads: 156.0K/mo ## What it is and what it does flask-redis is a Flask extension that wraps the redis-py library, allowing you to configure and use a Redis client within a Flask application using Flask's standard configuration system. Instead of manually instantiating and managing a redis-py client, you declare a FlaskRedis instance and configure it with a REDIS_URL, and the extension handles the connection lifecycle and makes the client available throughout your app. The package acts as a thin, Flask-aware adapter over redis-py. It supports both direct initialization and the deferred init_app pattern common in Flask extensions, allows custom Redis providers (useful for swapping in mock implementations during testing), and passes through all redis-py methods and keyword arguments unchanged. You interact with it exactly like a standard redis-py client once initialized. Use it for: - Add Redis caching to a Flask web application with minimal boilerplate using Flask config. - Use mock Redis via custom provider in tests while using real Redis in production. - Support multiple Redis databases in a single Flask app via config_prefix. - Access Redis from Flask route handlers and background tasks without manual connection management. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Integrates Redis into Flask applications as a managed extension, providing a Flask-aware client that wraps the redis-py library with configuration through Flask's config system. Yes, with conditions. The package is simple, well-documented, and has no known vulnerabilities. Install friction is low and it integrates cleanly with Flask's extension pattern. However, it has been dormant since 2019 and the license is undeclared—verify that the unclear license status is acceptable for your use case, and be aware that bug fixes or updates may be slow. If you need active maintenance or modern Python support guarantees, consider whether a direct redis-py integration or a more actively maintained alternative better suits your project. ## Install pip install flask-redis uv add flask-redis poetry add flask-redis ## Installing flask-redis Before you install: Low install friction with only two runtime dependencies (Flask and redis). However, the package is dormant—last release was 2019-05-29, with the most recent commit in 2024-03-04. No active maintenance; the sole maintainer works full-time and response times may be slow. License in practice: License treatment is unclear—the package metadata does not specify a license. The description notes that earlier work was Apache 2 licensed, but the current license status is not documented in the package metadata. Quickstart: pip install flask-redis from flask import Flask from flask_redis import FlaskRedis app = Flask(__name__) app.config['REDIS_URL'] = 'redis://localhost:6379/0' redis_client = FlaskRedis(app) value = redis_client.get('key') Requires a running Redis server; connection URL must be configured via Flask's REDIS_URL config variable. Verify before relying: - Whether the package works reliably with modern Flask and redis versions despite dormancy since 2019. - Current compatibility with Python versions beyond 3.7 (classifiers list only up to 3.7). - Whether the unclear license status poses any legal risk for commercial use. ## Package facts - License: not declared (unclear) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 156.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags flask redis integration, redis client for flask, flask extension redis, redis caching flask, flask redis configuration, flask-extension, redis-client [View on SkillFed](https://skillfed.io/packages/flask-redis) · [View on PyPI](https://pypi.org/project/flask-redis/)