Transactions in Gremlin using Python


I was trying to use transactions using the gremlinpython plugin. But it errors saying that
‘Graph’ object has no attribute ‘tx’

from gremlin_python.structure.graph import Graph

graph = Graph()
g = traversal().withRemote(DriverRemoteConnection(‘ws://localhost:8182/gremlin’, ‘g’))

Is this error due to the python plugin? Are there any alternatives?


Hi @ashish

that depends on the Gremlin Python.

You can check this couple of post here!topic/gremlin-users/lODr35_4TeI!topic/gremlin-users/7McuLqmazeE

Or ask directly to the gremlin forum.

Probably you would need to use the raw driver where you can send a script which contains multiple statement to run in a transaction



Thank you for the reply.
I had earlier googled these links and had looked at the replies from Stephen Mallette.