Cog is a graph database implemented purely in python. Torque is Cog’s graph query language. Cog also provides a low level API to its fast 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. It is written purely in Python so it has no dependencies other than Python standard library.
Check it out at: http://www.cogdb.io