Skip to content
Fernanda Scovino edited this page Aug 10, 2022 · 5 revisions

Connect to Redis local

  • In your shell, run:
kubectl port-forward svc/redis -n redis 6379:6379
  • Then you can access Redis on your localhost:6379

Get Redis client (Python)

# first, make sure to install:
# pip install redis-pal
from redis_pal import RedisPal
redis_client = RedisPal(host="...", port=XXXX)
  • If running local, set:
redis_client = RedisPal(host="localhost", port=6379)

Get/set Redis keys (Python)

# get value from key
redis_client.get(key)
# set new value to key
redis_client.set(key, value)
Clone this wiki locally