title: Python Requests and persistent sessions
body: <p>I am using the <a href="http://docs.python-requests.org/en/latest/" rel="noreferrer"><code>requests</code> module</a>.
  I have figured out how to submit data to a login form on a website and retrieve the session key, but I can't see an obvious way to use this session key in subsequent requests.
  Can someone fill in the ellipsis in the code below or suggest another approach?</p>
  <pre><code>&gt;&gt;&gt; import requests
  &gt;&gt;&gt; login_data =  {'formPosted': '1', 'login_email': 'me@example.com', 'password': 'pw'}
  &gt;&gt;&gt; r = requests.post('https://localhost/login.py', login_data)
  &gt;&gt;&gt; 
  &gt;&gt;&gt; r.text
  'You are being redirected &lt;a href=&quot;profilePage?_ck=1349394964&quot;&gt;here&lt;/a&gt;'
  &gt;&gt;&gt; r.cookies
  {'session_id_myapp': '127-0-0-1-825ff22a-6ed1-453b-aebc-5d3cf2987065'}
  &gt;&gt;&gt; 
  &gt;&gt;&gt; r2 = requests.get('https://localhost/profile_data.json', ...)
  </code></pre>