Jure Cuhalev

20 Mar, 2008

Listing all keys in S3 bucket using python boto

Posted by: Jure Cuhalev In: Planet Kiberpipa| Planet LiveCD| Tech| python

Source: FlickrWhen using python-boto package to list keys in your S3 bucket, you might hit a limit of 1000 keys when using function call bucket.get_all_keys(). In order to get full list of keys just do something along the lines of

keylist = [k for k in self.bucket]

since as it turns out, bucket has an iterator over key name.

(Discovered through patch of Mitchell Garnaat to Duplicity project).

Related posts:

  1. MSN Live Search python API access
  2. Posting to Koornk using Python
  3. Python MySpace API proxy
  4. Seeing lots of Wikipedia in your Google searches?
  5. Python SMTP sink server

No Responses to "Listing all keys in S3 bucket using python boto"

Comments are closed.

Flickr PhotoStream

    Visualizing Slovenian IT tax spendingMuffins in the makingWorkspace

About

jure100px_colour Jure Cuhalev is an Open Source Hacker, with background in Social Sciences and Usability and User Experience (UX).