RDFlib store on disk

After 2 days of research, I (the novice) still can’t figure out which on-disk stores are available in RDFFlib 3.1.0. If you have a working example, it would be nice to see ... For my application, I prefer SQLite. I do not need access to RDF online stores, I want to store information about relationships within the organization in RDF. Thanks

+3
source share
1 answer

Here you have an example to make it work with MySQL. I do not think that rdflib 3works with SQLite.

    import rdflib
    from rdflib.Graph import ConjunctiveGraph as Graph
    from rdflib import plugin
    from rdflib.store import Store, NO_STORE, VALID_STORE

    configString = "host=localhost,user=root,password=,db=db_name"
    rt = store.open(configString,create=False)
    assert rt == VALID_STORE,"The store is corrupted"
    print "load store success"
    graph = Graph(store)
    g.parse("some.rdf")
    g.commit()

I would avoid rdflib repositories on disks as they don't seem very reliable and don't scale very well. As you noticed, the documentation is also small.

, , Virtuoso 4store, SPARQL . Python.

+2

All Articles