downloading from s3

Showing 1-3 of 3 messages
downloading from s3 Daniel W 7/19/12 2:23 PM
I'm trying to use boto to download a large file from an s3 bucket, and I'm a little confused by which method I should use.
Am I right that I should be using key.getfile()?

Re: [boto-users] downloading from s3 Chris Moyer 7/19/12 2:55 PM
Key objects are similar to file objects in python, so you can just do read() to get the contents, or one of the special methods:
get_contents_as_string()
get_contents_to_filename("somefile")
get_contents_to_file(some_file_pointer)

But I prefer just to treat it as a string, unless you specifically want it downloaded to your file system. 

--------------------------------
Sent from my iPhone
Chris Moyer
VP of Technology, Newstex LLC
Please log all support requests to http://support.newstex.com

On Jul 19, 2012, at 5:23 PM, Daniel W <dweitz...@gmail.com> wrote:

I'm trying to use boto to download a large file from an s3 bucket, and I'm a little confused by which method I should use.
Am I right that I should be using key.getfile()?

--
You received this message because you are subscribed to the Google Groups "boto-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/boto-users/-/_A-lG9Y2FmIJ.
To post to this group, send email to boto-...@googlegroups.com.
To unsubscribe from this group, send email to boto-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/boto-users?hl=en.
Re: [boto-users] downloading from s3 Daniel W 7/20/12 7:24 AM
Ah, thanks Chris.
I had tried get_contents_to_filename() and it stopped mid-download, so I figured I was doing something wrong.  Turns out it was a disk space issue.