I had the same issue and thought about opening a bug:
- the Gremlin driver serialize the Python Int as Int32 (but Python int can hold int64 values also)
- the Gremlin-Console do not have this issue as the "string"/characters representing the integer are parsed correctly
for now as a workaround I am doing the following:
from gremlin_python.statics import long
g = traversal().withRemote(
DriverRemoteConnection('ws://{}:{}/gremlin'.format("127.0.0.1", "8182"), 'g'))
g.addV("label").property(T.id, "id").property("super_big_int", long(12313123123133))
using the long() before the int will force it to be serialized as Int64
I do not know if its the right way to go, but for a temp workaround its working,
in the future the python driver should handle the conversion to Int64 or Int32 based on the size or something
or maybe it was done intentionally to save space (if so why this is not an issue in the gremlin-console)