mnot’s blog

Design depends largely on constraints.” — Charles Eames

Monday, 29 August 2005

sparta.py 0.8

Filed under: Python Semantic Web

I’m happy to announce that version 0.8 of sparta, a simple API for RDF, is now available. As always, feedback and suggestions are appreciated.

This revision requires rdflib 2.2.1, as the APIs sparta relied upon have changed.

It also adds a new method on the factory, addAlias, that lets you bypass the prefix_localname convention for URIs that don’t map well to python tokens. See spartaTest.py for an example of its use. Thanks to Bill de hÓra for the suggestion and a prototype patch.

Looking forward, I’m looking to see if there’s anything special I should do to add support for contexts directly, or whether I should just rely on the underlying store. If you have any ideas about that, I’d love to hear them.

P.S. I’ve also gone ahead and made sparta a proper installation package; gotta love distutils. An installer for 0.72 is also available, in case you’re still on an older revision of rdflib.


6 Comments

Elias Torres said:

Mark, any updates on sparta working with Redland? I saw you already thought about it when released sparta 0.5.

Wednesday, August 31 2005 at 6:17 AM

eikeon said:

Elias, rdflib2.2.x has a Redland backend. You may want to give that a try depending on the level of integration you’re seeking.

Saturday, September 3 2005 at 10:27 AM

Cecelia Hickel said:

A question, would/could Sparta be a replacement for a custom python API from Redland to ZOPE? Redland offers a python API but one has to write some serious code to use it. Could be more useful if there was a widely used standard API from Zope to Redland for Semantic Web support. Zope Zemantic work for Zope 3 leaves off IMHO where Redland fits in. While Zope developers are intending to build another mousetrap for RDF storage, query, etc, the ZODB does not store triples. I am personally praying that someone sees the value of Redland at the Zope Corp. It makes sense to extend Zope to integrate with Redland than try to make Zope do what it does not do. I have been working on those requirements as such. Sparta is very interesting at this point.

Tuesday, September 6 2005 at 4:06 AM

Michel Pelletier said:

I’m not sure if you are confused about how Zemantic or rdflib works in Zope 3. It doesn’t reinvent anything, the storage and query features come from rdflib. rdflib can store triples in ZODB and several other databases, including Redland, although the Redland backend is still experimental.

The Zope core developers are not reinventing anything related to RDF, as far as I know. I, who am not a Zope core developer, have been working on rdflib integration into Zope 3 and 2.8.

I agree redland integration into Zope would be a good thing. Whether or not it uses the prototype Redland backend for rdflib or not. I also think Redland and rdflib should implement commonly interchangeable interfaces.

Monday, September 12 2005 at 3:57 AM

Cecelia Hickel said:

Is there a good place where we can discuss Zope and RDF? I tried to write something short but failed and this is not the place for a lengthy discussion. I am currently building a SOA using Zope. I require RDF, a full implementation. This is my design, I am the architect. I am not a programmer however. I have years invested and I could not be uprooted from the decision to use Zope, Zope products and CPS. I have yet to embrace Plone. However, Zope is not my RDF solution.

BTW I have not seen anything written or otherwise stated that Redland is still a prototype. I have observed it keeping the pace with RSS, RDF and the Semantic Web requirements as would be expected from Dan Brickley and Dave Beckett.. I see Redland as a not yet adopted developed and tested technology. RDF adoption is happening though.

The following links are resources for comparing Redland and rdflib RDF APIs http://www.langdale.com.au/GraphPath/python.html taken from http://www.langdale.com.au/GraphPath/tutorial.html.

Here is a python plugin for rdflib which includes both Redland and the ZODB http://svn.rdflib.net/trunk/rdflib/plugin.py

Here is more python as an import of Redland to rdflib http://svn.rdflib.net/trunk/rdflib/backends/Redland.py

And of course VanRees beat this whole matter up for a number of years http://vanrees.org/weblog/1085429465.

I found 2003 IRC chat logs which stated your same sentiments that a standard API would be nice, is needed and discussions on Redland and rdflib comparisons and a need to understand them, etc. The need still exists.

This final link http://www.plonelive.com/downloads/oscon.pdf goes over some semantic web aspects currently in development at Zope.

I appreciate your note, makes me review and refresh. I am glad to see Redland is on the table for Zope and could provide a parser solution.

But I have a naggin question in my mind..I just do not see the ZODB managing millions of RDF meta data and RDF queries while it manages user state, security and publishes dynamic content, especially since it may well need the end query result to assemble the logical document. How efficient could this actually be?

Thus, would not a python program such as Sparta be a good solution for Zope to extend its RDF capabilites? As an application framework, Zope needs to increase awareness to available programs and partners before internally developing a potentionally inferior program. That was the reference to reinventing the wheel. If it already exists, then use it, don’t reprogram it.

Thanks all

Friday, September 23 2005 at 1:59 AM

Creative Commons