I have created a long Gremlin chained command as a string. What is the best way to execute it in NodeJS or Python?
g.addV("person").
property(id, 1).
property("name", "marko").
property("age", 29).as("1").
addV("person").
property(id, 2).
property("name", "vadas").
property("age", 27).as("2").
addV("software").
property(id, 3).
property("name", "lop").
property("lang", "java").as("3").
addV("person").
property(id, 4).
property("name", "josh").
property("age", 32).as("4").
addV("software").
property(id, 5).
property("name", "ripple").
property("lang", "java").as("5").
addV("person").
property(id, 6).
property("name", "peter").
property("age", 35).as("6").
addE("created").from("1").to("3").
property(id, 9).
property("weight", 0.4).
addE("knows").from("1").to("2").
property(id, 7).
property("weight", 0.5).
addE("knows").from("1").to("4").
property(id, 8).
property("weight", 1.0).
addE("created").from("3").to("4").
property(id, 11).
property("weight", 0.4).
addE("created").from("3").to("6").
property(id, 12).
property("weight", 0.2).
addE("created").from("4").to("5").
property(id, 10).
property("weight", 1.0)
The command given above was executed on the Gremlin console and was successful, but I need to know how to achieve this in program of node or Python using TinkerPop drive.