Source code: http://inamidst.com/proj/rdf/ntriples.py API usage example: [[[ import ntriples # Set the node handlers ntriples.URI = MyURI ntriples.bNode = MybNode ntriples.Literal = MyLiteral # The sink must have a "triple" method. # It'll automatically call one of the handlers for each term # and then pass the result as sink.triple(subj, pred, objt). parser = ntriples.NTriplesParser(sink) # The parse method takes a file; parsestring takes a str. f = open(filename) sink = parser.parse(f) f.close() ]]] Acknowledgements: Christopher Schmidt, http://crschmidt.net/ for feedback