title: How to store and retrieve a dictionary with redis
body: <pre><code># I have the dictionary my_dict
  my_dict = {
      'var1' : 5
      'var2' : 9
  }
  r = redis.StrictRedis()
  </code></pre>
  
  <p>How would I store my_dict and retrieve it with redis.  For example, the following code does not work.</p>
  
  <pre><code>#Code that doesn't work
  r.set('this_dict', my_dict)  # to store my_dict in this_dict
  r.get('this_dict')  # to retrieve my_dict
  </code></pre>