title: How do I add a key to Flask's 'session' dictionary that would be available throughout the run of a program?
body: <p>The <em>Flask</em> context variable - <em>session</em> - is useful for passing values around in a program(especially between Flask and <em>Jinja2</em> in my case). How do I add a key to this dictionary at the start of my program (even before any route or view function is accessed) so I can use it throughout the lifetime of the program?  </p>
  
  <p>For instance I wish to add a user dict to this variable like so:</p>
  
  <pre><code>session['user'] = {}
  </code></pre>
  
  <p>and update (by adding or removing keys) with values during the program run.</p>