Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    PyDigg

    Download button

    No screenshots available
    Downloads: 585  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Derek van Vliet | More programs
    MIT/X Consortium Lic... / FREE
    April 20th, 2008, 21:47 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    PyDigg description

    PyDigg is a Python toolkit for the Digg API.

    PyDigg is a Python toolkit for the Digg API. It provides an object-oriented interface to all of the available endpoints of the API. It is offered under the MIT License.

    The toolkit is contained in one module ('digg.py'), made up of one class ('Digg') with several nested classes. It depends on the standard Python libraries 'urllib' and 'xml.dom'.

    You will only ever have to instance the root class, 'Digg'. From there it's a matter of using that class instance's methods to retrieve instances of nested classes such as 'Story', 'User', 'Comment', etc. The 'Digg' class contains all methods necessary to access data. Each nested class, such as 'Story', contains convenience methods that redirect back to the methods in "Digg".

    The following example outputs the titles of the latest stories submitted to Digg:

    from digg import *
    d = Digg(APPKEY) #insert your own application key string
    stories = d.getStories()
    for story in stories:
    print story.title


    In the above example, the Digg.getStories() method returns an instance of the 'Stories' container class, which contains n number of 'Story' instances. All response data from the Digg API is accessible by class properties. For instance, the 'User' class has the following properties: name, icon, registered, profileviews. I tried to align my naming conventions with those of the Digg API wherever possible.

    Product's homepage

      


    TAGS:

    python library | Digg API | object-oriented interface | Digg | API | Python

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM