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 :
- http://code.google.com/p/flickrpy/
- http://pypi.python.org/pypi/Flickr.API/
- http://stuvel.eu/projects/flickrapi
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
2010-10-27 07:22:22
How is the user authenticated in this process?
Gooner
2010-10-27 07:34:26
@Gooner: Added the link to authentication and edited my answer above. Check out the docs, it is pretty straight forward
pyfunc
2010-10-27 07:35:45
Thanks. Btw, what's an API KEY?
Gooner
2010-10-27 07:49:54
@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
2010-10-27 07:52:28
alright, thanks!
Gooner
2010-10-27 08:35:47