Questions tagged [gremlinpython]

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.

Links

223 questions
10
votes
1 answer

How do I connect to a remote Neo4j database using gremlin python?

From what I've read Neo4j implements apache tinkerpop which leads me to think I can use gremlin python and rather than connect to a gremlin server I can point the python code at a neo4j server and treat it like a gremlin server. However I can't find…
Alex Ward
  • 461
  • 4
  • 16
8
votes
2 answers

Is there a way of using Gremlin within an asyncio Python application?

The TinkerPop documentation describes GLV for Python. However, the examples presented in there are built around synchronous code. There is the aiogremlin library that was desingned to enable use of Gremlin in Python's asyncio code. Unfortunately,…
skalski
  • 111
  • 1
  • 6
7
votes
1 answer

Is it possible to generate gremlin queries from bytecode in python

Is it possible to generate gremlin script from the bytecode? I am working on a POC in which I need to query graph Azure CosmosDB database via Gremlin API. Currently, Azure CosmosDB does not support bytecode. Azure development team has started…
7
votes
1 answer

Why can't I connect to Gremlin-Server?

Abstract I'm trying to set up a Titan/Cassandra/Gremlin-Server stack in Docker (v1.13.0). The problem I'm facing is that applications trying to connect to Gremlin-Server on the default port 8182 are reporting errors (details below). First, here is…
Louis Thibault
  • 20,240
  • 25
  • 83
  • 152
6
votes
1 answer

Gremlin-Python Connecting to existing JanusGraph

I Have created a graph using gremlin console gremlin> ConfiguredGraphFactory.graphNames ==>MYGRAPH gremlin>…
Servesh Singh
  • 113
  • 1
  • 9
5
votes
2 answers

Merge results from multiple queries in Gremlin

Let's say I want to get a few vertices from my database: g.V(1, 2, 3) And then I have another set of vertices: g.V(4, 5, 6) Imagine it's not just g.V(), but some more complicated traversal to get my vertices. But the traversal must start with V(),…
Vojto
  • 6,901
  • 4
  • 27
  • 33
5
votes
1 answer

tinkerpop/gremlin-python: next() vs iterate()

What is the difference between next() and iterate() when working with gremlin? Why does next() return the added vertex when calling g.addV(), but iterate() does not? When should I use next() and when should I use iterate()?
JTW
  • 3,546
  • 8
  • 35
  • 49
5
votes
1 answer

Gremlin Python in Web Application

I have a python flask web app, which is querying a Janus graph DB using gremlin_python. One basic question is the correct way to initialize the graph traversal object. Can I initialize my traversal g =…
Max Arbiter
  • 318
  • 4
  • 18
5
votes
3 answers

Convert string command of Gremlin to executable

I have created a long Gremlin chained command as a string. What is the best way to execute it in NodeJS or Python? g.addV("person"). property(id, 1). property("name", "marko"). property("age", 29).as("1"). addV("person"). property(id, 2). …
4
votes
2 answers

Neptune - How to get distance to all nodes with proportional weights gremlin

I'm having difficult time figuring out query in gremlin for the following scenario. Here is the the directed graph (may be cyclic). I want to get top N favorable nodes, starting from node "Jane", where favor is defined as: favor(Jane->Lisa) =…
Some name
  • 53
  • 4
4
votes
2 answers

gremlin python clone traversal

I'm using gremlin-python to connect to gremlin-server and I'm trying to build up a query incrementally but I'm getting stuck. I have an initial part of my query like the following: query = g.V().hasLabel('') Now I would like to do…
cts
  • 1,790
  • 1
  • 13
  • 27
4
votes
1 answer

JanusGraph Data Ingestion atscale

We are ingesting data in Janusgraph on Kubernetes(GCP) using python. We are doing multithreading, node chaining, indexing but still we are able to ingest only 100k (Nodes) records in 60 minutes from bigquery. Kubernetes spec - 1 Pod with 25 vCPUs…
4
votes
1 answer

Gremlin - Use custom String/UUID as Vertex ID

I'm trying to add a vertex with a custom ID, and while I've browsed many threads on this (e.g. here), I still can't get it to work for strings/UUIDs, only integer IDs. In fact, it appears only to accept numbers, but I'm not sure why. gremlin>…
Ian
  • 3,605
  • 4
  • 31
  • 66
4
votes
0 answers

tornado.iostream.StreamClosedError: Stream is closed gremlin-python

I have an api that queries cosmos graph db using gremlin-python. But if calls are not made for a few hours this error pops up Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/tornado/websocket.py", line 1104, in…
4
votes
1 answer

Neptune-Gremlin-Python | Best practises for scaling network analysis and serving use cases like recommendations in realtime

I have a generic question around the best practises on usage of Neptune DB as a network database and its ability to scale up for complex computing. I want to develop a user recommendation system where incoming users on the platform are prompted…
1
2 3
14 15