Aan de slagGa gratis aan de slag

Connecting to a Redis cluster

You'll use Python to store and retrieve key-value data with Redis. In this exercises, you'll explore the basics of connecting to a Redis cluster running locally. Good luck!

Deze oefening maakt deel uit van de cursus

Introduction to NoSQL

Cursus bekijken

Oefeninstructies

  • Import the appropriate library to work with Redis using Python.
  • Create a connection to the Redis cluster running localhost over port 6379.
  • Make sure data is decoded when retrieved from Redis.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

import ____

# Create a connection to Redis cluster
r = redis.Redis(
  	host="____",
    port=____,
    decode_responses=____
  )
Code bewerken en uitvoeren