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.
Goal:
Accelerate the random walk generation by using multiple processes.
Get the list of vertices ids from which I want random walks to be generated in an input queue
Start as much processes as possible with the correct parameters
Make them put the…
I have some experience with using gremlin in the console but I'm fairly new to gremlin in python. I have found a query that does what I want it to do in the console but I get a 'GraphTraversal' object is not callable error when I try to convert it…
I have the following code, and run as expected. But I need to use the "g" traversal object to manipulate the graph.
from gremlin_python.process.anonymous_traversal import traversal
from gremlin_python.driver.driver_remote_connection import…
need some tips/advise on a gremlin query ... :)
I have these types of vertices ...
orders: id, cid (string), ts (long)
// predicates for the orders
ip: id
phone: id
// few more
and Edges go from predicates to orders:
ip -- ip_used_in -->…
I'm trying to create a graph from scratch that i'm visualising in graphexp, but i'm struggling to undertand the anonymized traversals concept and how to create them
I'm using python 3.9 and gremlinpython 3.5.1
Creating the connection and…
What is the correct way to store date/time stamp in a gremlin-based database like Amazon Neptune?
When I try the following in python
current_timestamp = datetime.datetime.now()
g.E('d').property('otp_verified_on', current_timestamp).next()
it gives…
I'm looking for an implementation to run text query ex: "g.V().limit(1).toList()" while using the PatitionStrategy in Apache TinkerPop.
I'm attempting to build a REST interface to run queries on selected graph paritions only. I know how to run a raw…
I tried following query with Gremlin and Tinkerpop
gremlin> graph = TinkerGraph.open()
==>tinkergraph[vertices:0 edges:0]
gremlin> g = traversal().withEmbedded(graph)
==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard]
gremlin> v =…
I'm running into a problem when using Flask with a gremlin database (it's an Amazon Neptune database) and using uWSGI. Everything works fine in my unit tests which use the test_client provided by Flask. However, in production we use uWSGI and there…
I trying to mirror the following gremlin code in Python to do pagination.
gremlin> t = g.V().hasLabel('person');[]
gremlin> t.next(2)
==>v[1]
==>v[2]
gremlin> t.next(2)
==>v[4]
==>v[6]
Here are the Python code
from…
using the airport dataset, I want to return a full elementMap of every airport - plus the count of incoming "route" edges.
What I have right now looks like this (Link to the example: https://gremlify.com/z05d54wyt99)
g.V().hasLabel('airport').
…
I am implementing a recommendation system with gremlin. I have 2M users and 20k books. When a user buys a book, it creates an edge to the book. I have total of 50M edge over the graph. I am using basic queries but it runs too slow. I am planing to…
What is the standard way to add edges between two already existing vertices in gremlin-python? I've tried numerous iterations including the two code versions below, but unfortunately they all lead to errors.
Code snippet 1:
v1=…
How to handle Transaction (Rollback and Commit) in Gremlin - AWS Neptune?
In a request, I have two details,
1. Create student vertex with properties
2. Create Edge b/w class & student
3. Create a list of subjects vertex…