diff options
| author | nitromaster101 <nitromaster101@5914aa95-5b3a-0410-a3b5-7b719e7fe9b2> | 2009-06-18 01:01:18 +0000 |
|---|---|---|
| committer | nitromaster101 <nitromaster101@5914aa95-5b3a-0410-a3b5-7b719e7fe9b2> | 2009-06-18 01:01:18 +0000 |
| commit | 8c20dd55e59489e233a6591247bac20a4c2e482d (patch) | |
| tree | 8e4d092f9841f5b999db6ed7c6f0f3e514764e73 /README | |
| parent | 0c9fbd67b05112e43fe86bd634b155bd07a8f9b2 (diff) | |
cleaned up README
git-svn-id: http://freebase-python.googlecode.com/svn/trunk@99 5914aa95-5b3a-0410-a3b5-7b719e7fe9b2
Diffstat (limited to 'README')
| -rw-r--r-- | README | 69 |
1 files changed, 59 insertions, 10 deletions
@@ -1,18 +1,67 @@ -These are two independent python libraries for use in -accessing Freebase services from Python: +description='Python client library for Freebase API service', +maintainer_email='developers@freebase.com', +url='http://www.freebase.com/', -* metaweb-py is the older and simpler of the two. It's an improved - version of the metaweb.py module originally developed by David - Flanagan as part of the original Freebase API documentation. +INSTALL: + + /usr/bin/python setup.py install - Pros: Single file, simpler. + When using freebase-python with Google AppEngine you will also need to + include the files in appengine_stubs with you AppEngine app. -* freebase-api is a more ambitious library that is derived from - code developed by Nick Thompson for accessing freebase services. +SYNOPSIS: - Pros: Does more. + #!/usr/bin/python -Both are available under a simple 2-clause BSD-style license that + import freebase + + query = { 'type':'/music/artist', + 'name':'Sting', + 'album':[], + } + freebase.mqlread(query) + + for album in result.album: + print album + + ----- OR ----- + + #!/usr/bin/python + + from freebase import HTTPMetawebSession, MetawebError + + mss = HTTPMetawebSession('www.freebase.com') + + query = { 'type':'/music/artist', + 'name':'Sting', + 'album':[], + } + + result = mss.mqlread(query) + + for album in result.album: + print album + +TESTING: + + cd test + /usr/bin/python test_all.py -v + + test_login (__main__.TestFreebase) ... ok + test_read (__main__.TestFreebase) ... ok + test_write (__main__.TestFreebase) ... ok + .... + + ---------------------------------------------------------------------- + Ran 12 tests in 0.691s + + OK + +freebase-api is now the standard python api for accessing freebase. +metaweb-py has now been deprecated and can only be found in older +releases of freebase-api. + +freebase-api is available under a simple 2-clause BSD-style license that should allow you to reuse this code in both open-source and commercial projects. |
