Skip to content

Commit

Permalink
doc: Clarify extent of proxying to redis-py (#51)
Browse files Browse the repository at this point in the history
Closes #50
  • Loading branch information
underyx authored Feb 11, 2020
1 parent f05e0d7 commit 4be9f1d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,17 @@ def create_app():
return app
```

The `FlaskRedis` client here will pass its keyword arguments
to the [`Redis` class](https://redis-py.readthedocs.io/en/latest/#redis.Redis)
from the [`redis-py`](https://github.com/andymccurdy/redis-py) library,
so all parameters from the `Redis` documentation page will work here as well
— such as `socket_timeout` and `encoding`.

### Accessing Redis

The redis client you created above from `FlaskRedis` acts just like a regular `Redis` instance from the [`redis-py`](https://github.com/andymccurdy/redis-py) library:
Access is done by using `FlaskRedis` as if it was a
[`Redis` class](https://redis-py.readthedocs.io/en/latest/#redis.Redis)
as well:

```python
from my_app import redis_client
Expand Down

0 comments on commit 4be9f1d

Please sign in to comment.