[Developers] Announcing freebase-python 1.0

Andrew Rodriguez andrew at metaweb.com
Fri Jul 10 23:52:11 UTC 2009


The freebase-python library 1.0 is now available! It introduces a new  
syntax for accessing the freebase api, it updates the available  
commands to reflect the entire web api, and it introduces some cool  
schema manipulation utilities. It's backwards compatible with previous  
versions of the library.

The new syntax makes it easy to run started with freebase:
 >>> import freebase
 >>> print freebase.mqlread({"id" : "/en/the_beatles", "name" : None})
{u'id': u'/en/the_beatles', u'name': u'The Beatles'}

You can also access freebase.sandbox as easy

 >>> import freebase.sandbox
 >>> print freebase.sandbox.mqlread(...)

freebase-python now can do all current api calls that the website  
handles. For a full list of the api calls and examples, you can refer  
to http://code.google.com/p/freebase-python/wiki/GettingStarted.

The schema manipulation utilities introduced make it easy copy and  
move types, properties, and objects. This means that you can save  
bases to your computer so that their survive a sandbox refresh, keep  
different versions of your bases and types on your own machine, or  
move types between bases. There are a few recipes on the freebase- 
python wiki that you can find here: http://code.google.com/p/freebase-python/w/list?can=2&q=label%3ARecipe%2CSchema-Manipulation

freebase-python is also very Google App Engine friendly. You can check  
out how to write your own app at http://code.google.com/p/freebase-python/wiki/GoogleAppEngine 
. You can also check out a sample app at http://freebase-images.appspot.com 
.

There are also more test and more docs!

Installing is easy, if you have easy_install, just say
  $ easy_install freebase
If you don't have easy_install, you can get it by running http://peak.telecommunity.com/dist/ez_setup.py 
.


More information about the Developers mailing list