My favorites | Sign in
Project Logo
                

pydelicious allows you to access the web service of del.icio.us via it's API through python.

(The original website was here: http://deliciouspython.python-hosting.com/ however pydelicious broke on the last del.icio.us API update and I was unable to contact the author so I'm posting the repaired code here going forward.)

  >>> from pydelicious import DeliciousAPI
  >>> from getpass import getpass
  >>> a = DeliciousAPI('username', getpass('Password:'))
  Password:
  >>> # Either succeeds or raises DeliciousError or subclass:
  >>> a.posts_add("http://my.url/", "title", 
  ... extended="description", tags="my tags")
  >>> len(a.posts_all()['posts'])
  1
  >>> a.tags_get() # or: a.request('tags/get')
  {'tags': [{'count': '1', 'tag': 'my'}, {'count': '1', 'tag': 'tags'}]}
  >>> a.posts_update()
  {'update': {'time': (2008, 11, 28, 2, 35, 51, 4, 333, -1)}}
  >>> # Either succeeds or raises DeliciousError or subclass:
  >>> a.posts_delete("http://my.com/")
  >>> len(a.posts_all()['posts'])
  0








Hosted by Google Code