W3C home > Mailing lists > Public > www-rdf-interest@w3.org > December 2004

python rdfwrapper

From: Phil Dawes <pdawes@users.sourceforge.net>
Date: 28 Dec 2004 13:37:25 +0000
To: www-rdf-interest@w3.org
Message-ID: <ECOWS03MocbJADhC8cq0003fb4f@smtp-out3.blueyonder.co.uk>

Hi All,

Meant to post this a while ago, but just didn't get round to it:
Have put together a package of wrapper code I've been developing as I
write python RDF applications. It wraps the rdflib and sparta
behaviour to present a nice (readable) api. well niceish.
It also integrates sparta-style properties with the rdflib search
functions. 


s = Store()
s.set_prefix_mapping("ex","http://example.com/")

phil = s["ex:Phil"]
phil.foaf_name = "Phil Dawes"

for subj in s.subjects(s['foaf:name'],"Phil Dawes"):
	print subj.foaf_name

More info here:

http://www.phildawes.net/blog/2004/12/25/rdfwrapper/

Cheers,

Phil
Received on Tuesday, 28 December 2004 13:36:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:52:12 GMT