Oort

— a Python toolkit for accessing RDF graphs as plain objects.

It has RDFLib under the crust.

Package

$ sudo easy_install Oort

Version 0.4 (Released 2007-10-07)Release History • [EasyInstall?]

Quickstart

from oort.rdfview import *
from oort.util.queries import Annotated

SIOC = Namespace("http://rdfs.org/sioc/ns#")

class Sioc(Annotated):
    _rdfbase_ = SIOC
    name = localized()
    description = localized()
    seeAlso = each(RDFS) >> Annotated

class Site(Sioc):
    main_item = one_where_self_is(SIOC.has_host) >> 'Item'

class Container(Sioc):
    children = each_where_self_is(SIOC.has_parent) >> Sioc

class Item(Sioc):
    host = one(SIOC.has_host) >> Site
    parts = each(SIOC.has_part) >> Annotated

# you need an rdflib graph instance and a get_lang callable here
context = QueryContext(graph, get_lang, queries=[Site, Container, Item])

site = context.view_for(URIRef("http://oort.to"))
for item in site.main_item.children:
    print item.uri, item.name, [p.label for p in item.parts]
                

OortPub

— a toolkit for creating RDF-driven WSGI-based web applications.

It uses Oort, Paste and Genshi for the heaving lifting.

Package

$ sudo easy_install OortPub

Version 0.1 (Released 2007-10-07)Release History

Feedback

Questions, suggestions, reflections, collaborations and contributions are all welcome.