Python YQL is a client library for making queries with Yahoo Query Language.
The Yahoo! Query Language is an expressive SQL-like language that lets you query, filter, and join data across Web services. With YQL, apps run faster with fewer lines of code and a smaller network footprint.
—YDN
Python YQL is supported extensively by Imaginaire Digital who offer digital marketing services, along with contributions from the community.
sudo pip install yql
Or alternatively:
sudo easy_install yql
The following example shows a simple query using the public endpoint.
>>> import yql
>>> y = yql.Public()
>>> query = 'select * from flickr.photos.search where text="panda" limit 3';
>>> result = y.execute(query)
>>> result.rows
[{u'isfamily': u'0', u'title': u'Panda can has fruit', u'farm': u'3', u'ispublic': u'1', u'server': u'2605', u'isfriend': u'0', u'secret': u'62ccb5d94e', u'owner': u'[email protected]', u'id': u'4135649462'}, {u'isfamily': u'0', u'title': u'Hey Panda', u'farm': u'3', u'ispublic': u'1', u'server': u'2799', u'isfriend': u'0', u'secret': u'1632cb8ab8', u'owner': u'[email protected]', u'id': u'4134889385'}, {u'isfamily': u'0', u'title': u'Panda Lin Hui', u'farm': u'3', u'ispublic': u'1', u'server': u'2737', u'isfriend': u'0', u'secret': u'099b30a0a4', u'owner': u'[email protected]', u'id': u'4135631774'}]
>>> for row in result.rows:
... print row.get('title')
...
Panda can has fruit
Hey Panda
Panda Lin Hui