title: requests - how to stream upload - partial file
body: <p>My goal is to do a PUT of part of a file using requests and stream the file (i.e., not load it into memory and then do the PUT). </p>
  
  <p><a href="http://docs.python-requests.org/en/latest/user/advanced/#streaming-uploads">This page</a> explains how you would do that for an entire file:</p>
  
  <blockquote>
    <p>Requests supports streaming uploads, which allow you to send large
    streams or files without reading them into memory. To stream and
    upload, simply provide a file-like object for your body:</p>
  </blockquote>
  
  <pre><code>with open('massive-body', 'rb') as f:
      requests.post('http://some.url/streamed', data=f)
  </code></pre>
  
  <p>However in my case I want to only send one chunk of the file.  Is there a way to accomplish this?</p>
  
  <p>In concept, something like:</p>
  
  <pre><code>with open('massive-body', 'rb') as f:
      requests.post('http://some.url/streamed', data=f.read(chunksize))
  </code></pre>