python from gremlin_python.process.anonymous_traversal import traversal from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection neptune_endpoint = "your-neptune-cluster-endpoint" neptune_port = 8182 gremlin_remote = DriverRemoteConnection(f"wss://{neptune_endpoint}:{neptune_port}/gremlin", "g") g = traversal().withRemote(gremlin_remote) response = g.V().hasLabel('person').out('knows').values('name').toList() print(response) gremlin_remote.close()


上一篇:
下一篇:
切换中文