python-3.x - Gremlin 服务器连接到 Orient DB

标签 python-3.x gremlin tinkerpop3 orientdb2.2 gremlin-server

我这样启动我的 Gremlin NEO4J

./gremlin-server.sh conf/gremlin-server-neo4j.yaml

我已经安装了 OrientDB 社区版,它似乎是通过 IP:2480/studio/index.htm 工作的文件

现在我正在尝试将我的 Gremlin 服务器连接到 Orient DB,但我找不到任何方法来实现它

连接 Gremlin 服务器的 Python 代码

from gremlin_python.driver import client as driver

# Constants for connections to gremlin
GREMLIN_VAR = 'g'
GREMLIN_URL = 'ws://localhost:8182/gremlin'
client = driver.Client(GREMLIN_URL, GREMLIN_VAR)

我发现但没有帮助的内容

  1. V3 doc但他们使用的是 Java 而不是 Python
  2. orientdb-server-config.xml但我需要一个用于 python 的 yaml 文件
  3. gremlin-server.sh -i org.apache.tinkerpop orientdb-gremlin 3.3.1 抛出错误“[ Unresolved 依赖性:org.apache.tinkerpop#orientdb-gremlin;3.3.1:没有找到]'
  4. 'orientdb-community-importers-2.2.31/bin' 执行了一个名为 'gremlin.sh' 的文件,但我无法执行类似 g = graph.traversal() 的操作
    1. 尝试了“./gremlin-server.sh -i com.orientechnologies orientdb-gremlin 2.2.31”,它安装了一些东西,但我不知道如何继续。

最佳答案

据我了解,您使用的是非常旧版本的 orientdb 配置,在最新版本中使用 orientdb-gremlin 3.0.2 他们将 gremlin 嵌入了 orientdb对于下载依赖项,请使用此 ./gremlin-server.sh -i com.orientechnologies orientdb-gremlin 3.0.2

根据来自 OP 的更多信息,添加

gremlin.graph=org.apache.tinkerpop.gremlin.orientdb.OrientFactory
orient-url=plocal:txt/GremlinServer
orient-user=admin
orient-pass=admin

希望对你有帮助

谢谢

关于python-3.x - Gremlin 服务器连接到 Orient DB,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49646876/

相关文章:

javascript - 普通 JSON 到 GraphSON 格式

javascript - 带有边数组的 Gremlin 值图

python - 使用分类数据创建维恩图 - matplotlib_venn

python - 如何制作只有 5 个高分的高分文本文件

java - 在 Gremlin 中 map() 是如何工作的?

gremlin - 如何在Gremlin中执行分页

Gremlin 找到最高匹配

gremlin - 正确处理 Gremlin 中的日期操作

python - 在三引号 fstring 中保留缩进

python-3.x - 在 Python 中使用 multiprocessing.Pool 和返回自定义对象的函数