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.
Trying to iteratively add vertices and edges. It seems to work, there are no errors, but I wish to verify that the edges are also correctly added.
The loops below insert at least the nodes, as the printing of the list length at the end shows, but…
Due to security policies, I have a cluster of JanusGraph servers (running in an internal Kubernetes network) that can be accessed by external Gremlin clients via the below network route:
clients --> global load balancer (URL-based) --> third-party…
When using gremlinpython, is it possible to only return a list of IDs for edges, instead of returning this long winded dictionary?
So, currently g.E().limit(10).id().toList() returns this:
[{'@type': 'janusgraph:RelationIdentifier',
'@value':…
I had hoped tha mapping a class to a vertex in gremlin python would be as simple as:
def toVertex(self,g):
t=g.addV(type(self))
for name,value in vars(self).items():
if debug:
print("%s=%s" % (name,value))
…
https://www.compose.com/articles/importing-graphs-into-janusgraph/
shows how you can import data into janus graph.
Since i couldn't get janusgraph docker working on my Mac computer using localhost i tried a connection to a remote Ubuntu machine…
I've got a gremlin graph with users who have features. The edges of the graph go out from the users and enter the features. There are no incoming edges to the users and there are no outgoing edges from the features. Each user vertex has many dozen…
Is it possible to use the Gremlin coalesce step to select a vertex by id (or properties) if such a vertex exists, otherwise insert the vertex? I've attempted to do so with the following, but I get a 'list' object has no attribute 'coalesce' error,…
For a given vertex, I can find whether a property myproperty contains a single substring substring1, as so:
g.V(993280096)
.filter({it.get().value("myproperty").contains("substring1")})
How can I extend this to search for multiple substrings in…
In gremlin-python I can do:
for e in g.E().toList():
print(e)
and will get a result like
e[11][4-created->3]
e[12][6-created->3]
e[7][1-knows->2]
e[8][1-knows->4]
e[9][1-created->3]
e[10][4-created->5]
According…
Currently I am using Neptune's bulk loader to load data from CSV to Neptune database using Python. I was getting only modified records. So I was only inserting the data.
Now the file contains full/historical records and the requirement is to delete…
The error:
TypeError: The child traversal of [['addV']] was not spawned anonymously - use the __ class rather than a TraversalSource to construct the child traversal
appears when trying to run the following code with python GLV
a = g.addV()
b =…