@@ -12,23 +12,14 @@ Add Redis Support to Flask.
12
12
13
13
Built on top of `redis-py <https://github.com/andymccurdy/redis-py >`_.
14
14
15
- Currently a single namespace within the configuration is supported.
16
15
17
- .. code-block :: python
18
-
19
- REDIS_URL = " redis://localhost"
20
-
21
- with the Redis instance automatically loading config from this namespace.
22
-
23
- In the future, the ability to declare multiple Redis namespaces will be available
24
-
25
- .. code-block :: python
16
+ Contributors
17
+ ------------
26
18
27
- REDIS_CACHE_URL = " redis://localhost/0"
28
- REDIS_METRICS_URL = " redis://localhost/0"
19
+ - Rhys Elsmore - @rhyselsmore - https://github.com/rhyselsmore
20
+ - Bence Nagy - @underyx - https://github.com/underyx
21
+ - Lars Schöning - @lyschoening - https://github.com/lyschoening
29
22
30
- redis_cache = Redis(config_prefix = " REDIS_CACHE" )
31
- redis_metrics = Redis(config_prefix = " REDIS_METRICS" )
32
23
33
24
Installation
34
25
------------
@@ -49,7 +40,7 @@ Configuration
49
40
-------------
50
41
51
42
Your configuration should be declared within your Flask config. You can declare
52
- via a Redis URL
43
+ via a Redis URL containing the database
53
44
54
45
.. code-block :: python
55
46
@@ -59,10 +50,8 @@ or you are able to declare the following
59
50
60
51
.. code-block :: python
61
52
62
- REDIS_HOST = " localhost"
63
- REDIS_PASSWORD = " password"
64
- REDIS_PORT = 6379
65
- REDIS_DATABASE = 5
53
+ REDIS_URL = " redis://:password@localhost:6379"
54
+ REDIS_DATABASE = 5
66
55
67
56
To create the redis instance within your application
68
57
@@ -114,4 +103,4 @@ Contribute
114
103
#. Write a test which shows that the bug was fixed or that the feature works as expected.
115
104
#. Send a pull request and bug the maintainer until it gets merged and published.
116
105
117
- .. _`the repository` : http://github.com/rhyselsmore/flask-redis
106
+ .. _`the repository` : http://github.com/rhyselsmore/flask-redis
0 commit comments