Hi everyone,

I'm using python-swiftclient and I'd like to be able to download several 
(small) files.
Actually I don't need/want to have those files saved to disk, I'd rather be 
able to use their contents in memory for later inline processing through a 
Jupyter notebook.
I can already download one file at a time by using swiftclient.SwiftService's 
.download() by passing options  = {"out_file": "-"},
provided my objects list only contains one file.
However, for efficiency reasons (i.e. high latency) I'd like to run several 
downloads in parallel.

I've identified the offending code block in 
https://github.com/openstack/python-swiftclient/blob/master/swiftclient/service.py:

            if options['out_file'] and len(objects) > 1:
options['out_file'] = None

I believe this should be something like:
            if options['out_file'] and len(objects) > 1 and options['out_file'] 
!= '-':
options['out_file'] = None

Then everything else should actually work out of the box, I assume.
Does that make any sense at all?

Thank you!
Gerlando
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to