# Python ऐप में रेडिस — रेडिस

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

> redis-py क्लाइंट से Python से रेडिस से बात करें।

## क्लाइंट इंस्टॉल करें

`redis-py` Python के लिए मानक, अच्छी तरह बना क्लाइंट है।

```bash
pip install redis
```

## कनेक्ट करें और उपयोग करें

`decode_responses=True` bytes की बजाय सीधी Python स्ट्रिंग लौटाता है — एक कम चीज़ बदलनी पड़ती है।

```python
import redis

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