public
Description: Python bindings for new Tracker RDF store with magic
Homepage:
Clone URL: git://github.com/Jc2k/tralchemy.git
name age message
file .gitignore Tue May 12 02:07:51 -0700 2009 Add a gitignore file [Jc2k]
file README Wed May 13 07:21:42 -0700 2009 Initial README [Jc2k]
file TODO Fri Jul 03 01:49:10 -0700 2009 Update TODO [Jc2k]
directory examples/ Sat Jul 04 12:25:03 -0700 2009 Notifications tidyups [Jc2k]
file test.py Fri Jul 03 02:16:51 -0700 2009 Add test docstrings and some more tests [Jc2k]
directory tralchemy/ Sat Jul 04 12:25:03 -0700 2009 Notifications tidyups [Jc2k]
README
This project aims to provide a simple API for dealing with data stored in the Tracker
RDF store.

Here are some simple examples to show the aim of the bindings (might differ from reality)


import tralchemy
from tralchemy.nco import Contact

# delete all existing contacts
for c in Contact.get():
    c.delete()

# add a contact
c = Contact.create()
c.fullname = "John Carr"
c.firstname = "John"
c.nickname = "Jc2k"
c.commit()

# find all the people called John
for c in Contact.get(firstname="John"):
    print c.uri, c.fullname

# subscribe to any contact changes
def callback(subjects):
    print subjects
Contact.notifications.connect("SubjectsAdded", callback)


Tralchemy implements a objects for the sys.meta_path interface, allowing it to provide a
virtual module for each tracker namespace. When you attempt to import a class from a
namespace (as above), it is looked up in Tracker and bound at runtime. Complete with docstrings.

It's planned that we'll be able to generate pydoc/epydoc documentation, complete with
property type annotations.