tags:

views:

39

answers:

1

Ok, so I need to build this application where I'll read images from a www.flickr.com account and use the images in my Python app. How will I do that? Any ideas? Thanks.

+6  A: 

You could use one of the various flickr python libraries :

And for a good overview of flickr API, always look at the docs: http://www.flickr.com/services/api/

An example:

import flickrapi
api_key = 'API KEY YYYYYYYYYY' # you will need a key
api_password = 'your secret'
flickrClient = flickrapi.FlickrAPI(api_key, api_password)
# now you could use the methods on this client
# flickrClient.methodname(param)
favourites = flickrClient.favorites_getPublicList(user_id='userid')
# Get the title of the photos
for photo in favourites.photos[0].photo:
    print photo['title']

[Edit:]

For authentication look at : http://stuvel.eu/flickrapi/documentation/#authentication

pyfunc
How is the user authenticated in this process?
Gooner
@Gooner: Added the link to authentication and edited my answer above. Check out the docs, it is pretty straight forward
pyfunc
Thanks. Btw, what's an API KEY?
Gooner
@Gooner: Check out the Flickr docs :) Give yourself some time reading the docs. Link: http://www.flickr.com/services/api/misc.api_keys.html
pyfunc
alright, thanks!
Gooner