# Redis in a Python App — Redis

Source: https://www.geekswithgeeks.com/en/redis/redis-python-client

> Talk to Redis from Python with the redis-py client.

## Install the client

`redis-py` is the standard, well-maintained client for Python.

```bash
pip install redis
```

## Connect & use it

`decode_responses=True` returns plain Python strings instead of bytes — one less thing to convert.

```python
import redis

r = redis.Redis(host="localhost", port=6379, decode_responses=True)
r.set("greeting", "hello", ex=60)
print(r.get("greeting"))   # hello
```
