Trio - Python RDF Utilities

Download: trio.tar.bz2 (2008-02-20, rev 26)

Once downloaded, optionally do make test to check it works.

You can then use Trio to, for example, print my friends' names:

import trio

G = trio.Graph('http://inamidst.com/sbp/foaf.rdf')
Q = trio.n3('[ foaf:knows [ foaf:name ?name ] ]')
for name in G.query(Q, 'name'): 
   print name

The API is not yet stable. The documentation has more examples.

Repository

To get Trio's full Mercurial repository, do this in a new directory:

$ hg init
$ hg unbun -u http://inamidst.com/sw/trio/trio.hg

Then do this whenever you want to get your local version up to date:

$ make pull

You can also browse the files.

Sean B. Palmer, inamidst.com