Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python web app with redis github

from flask import Flask
from flask_redis import FlaskRedis
from mockredis import MockRedis


def create_app():
    app = Flask(__name__)
    if app.testing:
        redis_store = FlaskRedis.from_custom_provider(MockRedis)
    else:
        redis_store = FlaskRedis()
    redis_store.init_app(app)
    return app
Source by github.com #
 
PREVIOUS NEXT
Tagged: #python #web #app #redis #github
ADD COMMENT
Topic
Name
5+5 =