You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is fairly straightforward to bootstrap an environment inside the Python console so that it can be used with a Gremlin Server. This has the advantage of being able to mix Gremlin and Python (and also use Python variables to manipulate results).
# Configure the environment so the Python Console can connect to
# a Gremlin Server using gremlin-python and a web socket connection.
from gremlin_python import statics
from gremlin_python.structure.graph import Graph
from gremlin_python.process.graph_traversal import __
from gremlin_python.process.strategies import *
from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
from gremlin_python.process.traversal import
import os
server = os.environ["GREMLIN_SERVER_NAME"]
port = os.environ["GREMLIN_SERVER_PORT"]
endpoint = 'ws://' + server + ':' + port + '/gremlin'
print(endpoint)
graph=Graph()
connection = DriverRemoteConnection(endpoint,'g')
g = graph.traversal().withRemote(connection)
The text was updated successfully, but these errors were encountered:
We are using JanusGraph with Python to analyze Python packages in the Python ecosystem. Here is an example notebook published (the repo it lives in has more notebooks) and here is our graph database adapter for using Gramlin queries and connecting to JanusGraph.
It is fairly straightforward to bootstrap an environment inside the Python console so that it can be used with a Gremlin Server. This has the advantage of being able to mix Gremlin and Python (and also use Python variables to manipulate results).
The text was updated successfully, but these errors were encountered: