DT Flickr

DT Flickr is a spiffy automagically built Flickr API library for Python using JSON.

It requires Python 2.5 or higher and uses simplejson 1.7 or higher (required for Python 2.5) or the built in json module (Python 2.6 or higher if simplejson is not available). It is released under the Apache License, Version 2.0.


Sourcedtflickr-1.5.tar.bz223.3 kB
Eggdtflickr-1.5-py2.6.egg61.0 kB
Windows i386dtflickr-1.5.win32.exe214.1 kB
Windows kB

More downloads are available at Python Package Index : dtflickr.

You can get the code straight from the repository:

svn co dtflickr


On FreeBSD, you can install it from the port www/py-dtflickr:

cd /usr/ports/www/py-dtflickr
make install


On Debian or Ubuntu, you can install it from

aptitude install python-dtflickr


Usage Example:

import dtflickr

flickr = dtflickr.Flickr(api_key)
response = flickr.urls.getUserPhotos(user_id = '22264298@N00')

print response.user.url

# Output:

DT Flickr also contains some utility functions to assist with some common tasks:

getPhotoSourceURL(photo, size=None)
  Returns a photo source URL.


    photo (Required)
      A photo response.

    size (Optional)
      A size constant (SmallSquare, Thumbnail, Small, Medium (default), Large, or Original).

  Returns a web page profile URL of a user.


    user_id (Required):
      The NSID or username of the user.

  Returns a web page photostream URL of a user.


    user_id (Required)
      The NSID or username of the user.

getBuddyiconURL(person, flickr=None)
  Returns a buddyicon URL for a person.


    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.

  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.

    url (Required)
      A Flickr URL.
Last modified 4 years ago Last modified on Jun 26, 2011, 6:27:49 PM