如何在python中创建用于测试目的的内存图,而无需专门配置gremlin服务器 - 类似于here
graph = JanusGraphFactory.build().set('storage.backend', 'inmemory').open()
我使用的是gremlin-python,但无法构建图形,而是连接到图形。
我当然可以使用内存后端启动和配置gremlin服务器,然后连接到它。但考虑到我想在内存中用于测试目的,这似乎是多余的
答案 0 :(得分:3)
JanusGraph是一个用Java编写的图形数据库。没有JanusGraph的本机Python实现,因此您需要使用使用inmemory
存储后端的配置来配置Gremlin Server。
gremlin.graph=org.janusgraph.core.JanusGraphFactory
storage.backend=inmemory
有关完整配置的更多详细信息,请查看此gist。