A Persistent Embedded Graph Database for Python
Cog
Embedded Graph Database for Python.
Installing Cog
pip install cogdb
Cog is a persistent embedded graph database implemented purely in Python. Torque is Cog’s graph query language. Cog also provides a low level API to its fast persistent key-value store.
Cog is ideal for python applications that does not require a full featured database. Cog can easily be used as a library from within a Python application. Cog be used interactively in an IPython environment like Jupyter notebooks.
Cog can load a graph stored as N-Triples, a serialization format for RDF. See Wikipedia, W3C for details.
In short, an N-Triple is sequence of subject, predicate and object in a single line that defines a connection between two vertices:
vertex