RDFLIB is a mature implementation of a triple store, with plenty of documentation.
However, this library worked for me only for smaller projects. For example there is a nice RDF/XML catalog of the Gutenberg Project Library, which i wasn't able to hack around with (on my dual-core, 2GBRAM machine), because it's simply too large (~ 100M) - even Java/Protege had a tendency to stall on this filesizes. It's a pity.
Alternative: http://seth-scripting.sourceforge.net/