title: How to stream (upload) large amount of data with Requests in Python?
body: <p>The module <code>requests</code> provides a high level HTTP API. Using <code>requests</code> I'd like to send data via HTTP using a POST request. The documentation is very short about this, stating that a "file like object" should be provided without stating clearly what exactly <code>requests</code> would expect from that object. I've some binary data, but unfortunately this is generated data and I have <em>not</em> a file like object. How could I possibly implement a "file like object" myself that would conform to the expectations of <code>requests</code>? The documentation is quite poor in that regard and I wasn't able to clarify this by looking into the source code of <code>requests</code> myself. Has anyone done this before using the <code>requests</code> API?</p>