Streaming Iterator
See https://github.com/kennethreitz/requests/issues/1648 for some more detailed reasoning.
In short, if you have a iterator that you know the size of, and a server that doesn't like or accept chunked transfer-encoding, you want to use this class. It will wrap the iterator and provide a sufficiently file-like object for requests to use to stream the data.
For example,
from requests_toolbelt.streaming_iterator import StreamingIterator
import requests
r = requests.post('https://httpbin.org/post', data=StreamingIterator(length, iterator))