Download | Documentation | Installation | Examples & Applications | FAQ
Pyrple parses RDF/XML, N3, and N-Triples. It has in-memory storage with API-level querying, experimental marshalling, many utilities, and is small and minimally interdependent. It can do graph isomorphism testing, rule application, etc.
Source code: pyrple-2004-06-06.tar.gz (alpha)
You can also browse the source via HTTP. The hoot OWL Syntax Checker and RDFe schema-aware RDF editor are implemented using Pyrple.
Minimal whilst the API is in flux. There's some in the source documentation directory.
Requirements: Python 2.3 or later. On non-Windows boxen:
$ wget http://infomesh.net/pyrple/pyrple-2004-06-06.tar.gz $ tar -zxvf pyrple-2004-06-06.tar.gz $ su -c mv pyrple-2004-06-06 /usr/lib/python2.3/site-packages/pyrple
On windows boxen:
There are some applications built on top of Pyrple which you can play around with right now:
More to come soon. For example, I've a series of utilities being worked on which includes scripts such as the following:
#!/usr/bin/python from pyrple import Graph, Var, Triple from pyrple.namespaces import FOAF, VAR QueryTriples = (Triple(VAR.someone, FOAF.knows, VAR.person), Triple(VAR.person, FOAF.name, VAR.name), Triple(VAR.person, FOAF.homepage, VAR.homepage)) def main(uri): foaf = Graph(uri=uri) query = Graph(triples=QueryTriples) for result in foaf.query(query): print result[VAR.name], result[VAR.homepage] if __name__=="__main__": import sys main(sys.argv[1])
This is a question that eikeon's probably asking. Pyrple is, in fact, the lastest evolution of a series of RDF APIs that I've been working on for a couple of years, starting with SWIPT and moving through Eep. It's been in continual development, but the last public release that I've made of any API was over a year ago, and pyrple reflects such a significant change in the code that there's maybe only 1% or less of code from a year ago.
I think that pyrple will tend to be less interdependent, and more hackish than RDFLib. Generally, if you're picking an RDF API, you should go with RDFLib. But if you don't mind getting your hands dirty, and you want something that's small and handy, I think that pyrple should at least be something you want to check out. And it's a nicer colour.
Why not?
If you've any comments or feedback, please don't hesitate to contact me: you can either email me at sean@mysterylights.com, or speak to me on IRC as sbp on irc.freenode.net (on #rdfig, #sbp, and #foaf). IRC is preferred at the moment.
Waxing homepage: Sean B. Palmer