DT Flickr
DT Flickr is a spiffy automagically built Flickr API library for Python using JSON.
It requires Python 2.5 or higher and simplejson 1.7 or higher. It is released under the Apache License, Version 2.0.
Download
| Source | dtflickr-1.0.tar.bz2 | 17.4 kB |
| Egg | dtflickr-1.0-py2.5.egg | 39.8 kB |
| Windows | dtflickr-1.0.win32.exe | 75.8 kB |
More downloads may be available at Python Package Index : dtflickr.
Or you can get the code straight from the repository:
svn co http://svn.douglasthrift.net/svn/dtflickr/trunk dtflickr
On FreeBSD, you can install it from the port www/py-dtflickr:
cd /usr/ports/www/py-dtflickr
make
make install
Documentation
Usage Example:
import dtflickr flickr = dtflickr.Flickr(api_key) response = flickr.urls.getUserPhotos(user_id = '22264298@N00') print response.user.url # Output: # # http://www.flickr.com/photos/douglaswth/
DT Flickr also contains some utility functions to assist with some common tasks:
getPhotoSourceURL(photo, size=None)
Returns a photo source URL.
Arguments:
photo (Required)
A photo response.
size (Optional)
A size constant (SmallSquare, Thumbnail, Small, Medium (default), Large, or Original).
getWebPageProfileURL(user_id)
Returns a web page profile URL of a user.
Arguments:
user_id (Required):
The NSID or username of the user.
getWebPagePhotostreamURL(user_id)
Returns a web page photostream URL of a user.
Arguments:
user_id (Required)
The NSID or username of the user.
getBuddyiconURL(person, flickr=None)
Returns a buddyicon URL for a person.
Arguments:
person (Required)
A person response or (if the flickr argument is specified) an NSID of the user.
flickr (Optional)
A Flickr API instance used to get a person response.
getURLDetails(url)
Parses a Flickr URL and returns useful information from it or None if it is not a useful URL.
This can currently parse photo source, user profile, user photos, photo, set, and buddyicon URLs.
Arguments:
url (Required)
A Flickr URL.
Attachments
-
dtflickr-1.0.tar.bz2
(17.4 kB) - added by douglas
9 days ago.
Source
-
dtflickr-1.0-py2.5.egg
(39.8 kB) - added by douglas
9 days ago.
Egg
-
dtflickr-1.0.win32.exe
(75.8 kB) - added by douglas
9 days ago.
Windows
