Lightweight in-memory RDF triple store for Python with configurable indexing.
pip install tripleliteFor rdflib interop:
pip install triplelite[rdflib]from triplelite import TripleLite, RDFTerm
g = TripleLite()
g.add(("http://example.org/s", "http://example.org/p", RDFTerm("uri", "http://example.org/o")))
for s, p, o in g.triples(("http://example.org/s", None, None)):
print(s, p, o.value)See the full documentation at opencitations.github.io/triplelite.