Why use Flask's Redis extension? Why use Flask's Redis extension? flask flask

Why use Flask's Redis extension?


Current maintainer of the package here, hi!

I think the two (admittedly minor) conveniences that the package provides are:

  1. Integration with Flask's configuration management, so you can organize all your app configuration in the same place. You can add your Redis database URL next to the one for PostgreSQL or whatever you're using, and it'll be picked up automatically when you initialize the FlaskRedis app.

  2. Automatically attaching to your Flask application, so you don't have to keep importing your Redis instance across modules, as it's already always with you, accessible like this: app.extensions['redis']. But if you want to import it anyway, you can also import the module with import flask.ext.redis.