JanusGraph在记忆中进行测试

时间:2017-06-19 13:41:52

标签: python janusgraph

如何在python中创建用于测试目的的内存图,而无需专门配置gremlin服务器 - 类似于here

graph = JanusGraphFactory.build().set('storage.backend', 'inmemory').open()

我使用的是gremlin-python,但无法构建图形,而是连接到图形。

我当然可以使用内存后端启动和配置gremlin服务器,然后连接到它。但考虑到我想在内存中用于测试目的,这似乎是多余的

1 个答案:

答案 0 :(得分:3)

JanusGraph是一个用Java编写的图形数据库。没有JanusGraph的本机Python实现,因此您需要使用使用inmemory存储后端的配置来配置Gremlin Server。

gremlin.graph=org.janusgraph.core.JanusGraphFactory
storage.backend=inmemory

有关完整配置的更多详细信息,请查看此gist