Plugin stores

Built In

The following Stores are contained within the rdflib core package:

Name

Class

Auditable

AuditableStore

Concurrent

ConcurrentStore

SimpleMemory

SimpleMemory

Memory

Memory

SPARQLStore

SPARQLStore

SPARQLUpdateStore

SPARQLUpdateStore

BerkeleyDB

BerkeleyDB

default

Memory

External

The following Stores are defined externally to rdflib’s core package, so look to their documentation elsewhere for specific details of use.

Name

Repository

Notes

SQLAlchemy

https://github.com/RDFLib/rdflib-sqlalchemy

An SQLAlchemy-backed, formula-aware RDFLib Store. Tested dialects are: SQLite, MySQL & PostgreSQL

leveldb

https://github.com/RDFLib/rdflib-leveldb

An adaptation of RDFLib BerkeleyDB Store’s key-value approach, using LevelDB as a back-end

Kyoto Cabinet

https://github.com/RDFLib/rdflib-kyotocabinet

An adaptation of RDFLib BerkeleyDB Store’s key-value approach, using Kyoto Cabinet as a back-end

HDT

https://github.com/RDFLib/rdflib-hdt

A Store back-end for rdflib to allow for reading and querying HDT documents

Oxigraph

https://github.com/oxigraph/oxrdflib

Works with the Pyoxigraph Python graph database library

If you have, or know of a Store implementation and would like it listed here, please submit a Pull Request!

Use

You can use these stores like this:

from rdflib import Graph

# use the default memory Store
graph = Graph()

# use the BerkeleyDB Store
graph = Graph(store="BerkeleyDB")

In some cases, you must explicitly open and close a store, for example:

from rdflib import Graph

# use the BerkeleyDB Store
graph = Graph(store="BerkeleyDB")
graph.open("/some/folder/location")
# do things ...
graph.close()