Skip to content

Instantly share code, notes, and snippets.

@benoitguigal
Created July 20, 2018 08:36
Show Gist options
  • Save benoitguigal/d3860f32d5d1a5537d09e880f741ebbb to your computer and use it in GitHub Desktop.
Save benoitguigal/d3860f32d5d1a5537d09e880f741ebbb to your computer and use it in GitHub Desktop.
Gremlin Python Language Driver
>>> from gremlin_python.driver import client
>>> gremlin_client = client.Client('ws://localhost:8182/gremlin', 'g')
>>> gremlin_client.submit("[1,2,3,4]").next()
[1, 2, 3, 4]
>>> query = "g.V().has('name', 'saturn')"
>>> gremlin_client.submit(query).next()
[v[4240]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment