see https://pypi.org/project/gremlinpython/
Gremlin-Python implements Gremlin within the Python language and can be used on any Python virtual machine including the popular CPython machine.
I am trying to get the count of all vertices with a particular label and all its children in one query like so:
g.V().hasLabel('folder').has('folder_name', 'root').as_('a', 'b').select('a',…
As outlined here https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin-differences.html custom vertex ids can only be set with the unquoted id property, i.e., g.addV('label1').property(id, 'customid'). How can one accomplish this…
It might be easy, but I am really struggling with this problem. I use gremlin python lib and aws neptune db.
I know the vertex id, I just want to get the value(String type in python) of one of the properties of the vertex, and update it.
I have…
I have written the following query which returns all paths possible from the specified node.
g.V().repeat(bothE().bothV().simplePath()).emit().dedup().path()
If we had a simple graph of 3 nodes in this structure:
A -- edge_1 -> B -- edge_2…
I am brand new to Gremlin and am using gremlin-python to traverse my graph. The graph is made up of many clusters or sub-graphs which are intra-connected, and not inter-connected with any other cluster in the graph.
A simple example of this is a…
I have a Flask web app in which I want to keep a persistent connection to an AWS Neptune graph database. This connection is established as follows:
from gremlin_python.process.anonymous_traversal import traversal
from…
I'm trying to put together a demo of Neptune using Neptune workbench, but something's not working right. I've got this block set up:
from __future__ import print_function # Python 2/3 compatibility
from gremlin_python import statics
from…
Given two Gremlin queries q1 and q2 and their results ri = qi.toSet(), I want to find all nodes in r1 that have a connection to a node in r2 - ignoring edge labels and direction.
My current approach included the calculation of shortest paths between…
I'm trying to use Amazon Neptune, in my gremlin query I need to filter nearby users and also filter by other relationships, similar to what Tinder (a dating app) does.
So I need a geolocation distance calculation into the query. I can't find that…
In JanusGraph,there is some function like
g.E().has('place', geoWithin(Geoshape.circle(37.97, 23.72, 50)))
to search place data. Now I want to use gremlinpython to do that,but I can't find the suitable API from the document.
I am running JanusGraph 0.3.1 and using gremlin python 3.3.4 and python3.7
In the test case below, I created 65 vertices. When I use
g.V(list_of_ids).valueMap(true).toList(). JanusGraph returns only 64
results instead of 65.
As a workaround I…
I am using the Gremlin-Python Client to query Gremlin Server with a janusgraph backend.
Running the following query:
graph = Graph()
g = graph.traversal().withRemote(DriverRemoteConnection('ws://localhost:8182/gremlin','g'))
sg =…
I am using the orientdb and gremlin server in python, Gremlin server is started successfully, but when I am trying to add one vertex to the orientdb through gremlin code it's giving me an error.
query = """graph.addVertex(label, "Test", "title",…
I`m trying to use tinkerpop3.2.3 to conncet janusgraph0.1.1 on my centOS7, everything works fine in gremlin shell. I tried to use gremlin-python3.2.3 in python shell, it also works well. But when I moved my codes to jupyter notebook, I got…