I have created a graph with a set of vertices and edges in JanusGraph using Gremlin console. I want to open the same graph and want to add more vertices using Gremlin-Python.
I have written below code, but it is not working and it gives me zero vertices.
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
statics.load_statics(globals());
graph = Graph()
remote_connection = DriverRemoteConnection('ws://localhost:8182/gremlin','g');
g = graph.traversal().withRemote(remote_connection);
print(g)
print (g.V().count().next());
I don't know how to connect with the existing graph "mygraph" using Gremlin-Python? I don't want to create new graph here.