@@ -9,7 +9,8 @@ Flask-Redis
9
9
:target: https://coveralls.io/github/underyx/flask-redis
10
10
:alt: Test Coverage
11
11
12
- .. image :: https://landscape.io/github/underyx/flask-redis/master/landscape.svg?style=flat
12
+ .. image :: https://landscape.io/github/underyx/flask-redis/master/landscape.svg
13
+ ?style=flat
13
14
:target: https://landscape.io/github/underyx/flask-redis
14
15
:alt: Code Health
15
16
@@ -45,7 +46,8 @@ Or if you *must* use easy_install:
45
46
Configuration
46
47
-------------
47
48
48
- Your configuration should be declared within your Flask config. Set the URL of your database like this:
49
+ Your configuration should be declared within your Flask config. Set the URL of
50
+ your database like this:
49
51
50
52
.. code-block :: python
51
53
78
80
redis_store.init_app(app)
79
81
return app
80
82
81
- or perhaps you want to use the old, plain ``Redis `` class instead of ``StrictRedis ``
83
+ or perhaps you want to use the old, plain ``Redis `` class instead of
84
+ ``StrictRedis ``
82
85
83
86
.. code-block :: python
84
87
@@ -91,8 +94,9 @@ or perhaps you want to use the old, plain ``Redis`` class instead of ``StrictRed
91
94
92
95
or maybe you want to use
93
96
`mockredis <https://github.com/locationlabs/mockredis >`_ to make your unit
94
- tests simpler. As of ``mockredis `` 2.9.0.10, it does not have the ``from_url() ``
95
- classmethod that ``FlaskRedis `` depends on, so we wrap it and add our own.
97
+ tests simpler. As of ``mockredis `` 2.9.0.10, it does not have the
98
+ ``from_url() `` classmethod that ``FlaskRedis `` depends on, so we wrap it and add
99
+ our own.
96
100
97
101
.. code-block :: python
98
102
@@ -121,7 +125,8 @@ classmethod that ``FlaskRedis`` depends on, so we wrap it and add our own.
121
125
Usage
122
126
-----
123
127
124
- ``FlaskRedis `` proxies attribute access to an underlying Redis connection. So treat it as if it were a regular ``Redis ``
128
+ ``FlaskRedis `` proxies attribute access to an underlying Redis connection. So
129
+ treat it as if it were a regular ``Redis ``
125
130
instance.
126
131
127
132
.. code-block :: python
@@ -132,21 +137,27 @@ instance.
132
137
def index ():
133
138
return redis_store.get(' potato' , ' Not Set' )
134
139
135
- **Protip: ** The redis-py _ package currently holds the 'redis' namespace, so if you are looking to make use of it, your
136
- Redis object shouldn't be named 'redis'.
140
+ **Protip: ** The redis-py _ package currently holds the 'redis' namespace, so if
141
+ you are looking to make use of it, your Redis object shouldn't be named 'redis'.
137
142
138
- For detailed instructions regarding the usage of the client, check the redis-py _ documentation.
143
+ For detailed instructions regarding the usage of the client, check the redis-py _
144
+ documentation.
139
145
140
- Advanced features, such as Lua scripting, pipelines and callbacks are detailed within the projects README.
146
+ Advanced features, such as Lua scripting, pipelines and callbacks are detailed
147
+ within the projects README.
141
148
142
149
Contribute
143
150
----------
144
151
145
- #. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug. There is a
146
- Contributor Friendly tag for issues that should be ideal for people who are not very familiar with the codebase yet.
147
- #. Fork `the repository `_ on Github to start making your changes to the **master ** branch (or branch off of it).
148
- #. Write a test which shows that the bug was fixed or that the feature works as expected.
149
- #. Send a pull request and bug the maintainer until it gets merged and published.
152
+ #. Check for open issues or open a fresh issue to start a discussion around a
153
+ feature idea or a bug. There is a Contributor Friendly tag for issues that
154
+ should be ideal for people who are not very familiar with the codebase yet.
155
+ #. Fork `the repository `_ on Github to start making your changes to the
156
+ **master ** branch (or branch off of it).
157
+ #. Write a test which shows that the bug was fixed or that the feature works as
158
+ expected.
159
+ #. Send a pull request and bug the maintainer until it gets merged and
160
+ published.
150
161
151
162
.. _`the repository` : https://github.com/underyx/flask-redis
152
163
.. _redis-py : https://github.com/andymccurdy/redis-py
0 commit comments