docker/docker-py — pull request #320 by ssssam (2014-09-17 16:20:40+00:00)
Title: Allow importing images from streams

This branch reworks the import_image() code and adds an import_image_from_stream() function, that can read tar data from an iterable object and send it as HTTP chunked data. This means we can send large images without having to read the whole image into RAM.

It also means you can import a system that isn't stored as a tar file, by creating and streaming a tar 'on the fly'.

I had to rework the UnixHTTPConnection code to get this to work. I think the result is cleaner.

I hope you think this is useful. I've not submitted any patches for this project before so please be gentle when pointing out style mistakes, general stupidity etc. :)