4

A custom id can be supplied to a new vertex at the Gremlin Console as follows:

gremlin> g.addV('person').property(id, 1234).next()
==>v[1234]

In the Java client it can be done as follows:

graph.addVertex(T.id, customId);

(Where T is org.apache.tinkerpop.gremlin.structure.T)

Is there an equivalent of T.id for gremlin_python to facilitate the above form?

Many thanks.

Amit Tripathi
  • 7,003
  • 6
  • 32
  • 58
Ned Lowe
  • 301
  • 1
  • 13

1 Answers1

8

There is a T enum for Python at gremlin_python.process.traversal.T (source code)

stephen mallette
  • 45,298
  • 5
  • 67
  • 135