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

123 questions
9
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
  • 391
  • 3
  • 14
6
votes
1 answer

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
  • 93
  • 1
  • 6
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
  • 300
  • 3
  • 16
5
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…
5
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
  • 16,122
  • 21
  • 72
  • 136
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
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 Python: Count vertices and its children in one query

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',…
Raghav Jajodia
  • 289
  • 3
  • 6
4
votes
2 answers

How to retrieve a property value of a vertex in python gremlin

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…
Hongli Bu
  • 377
  • 1
  • 17
4
votes
1 answer

Gremlin-Python Connecting to existing JanusGraph

I Have created a graph using gremlin console gremlin> ConfiguredGraphFactory.graphNames ==>MYGRAPH gremlin>…
Servesh Singh
  • 93
  • 1
  • 9
3
votes
1 answer

Get all paths in a graph from a node, but only ones which terminate

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…
KOB
  • 3,062
  • 1
  • 24
  • 60
3
votes
1 answer

Gremlin query to find the entire sub-graph that a specific node is connected in any way to

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…
KOB
  • 3,062
  • 1
  • 24
  • 60
3
votes
1 answer

Can't add vertex with python in neptune workbench

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…
lostinplace
  • 1,488
  • 3
  • 13
  • 37
3
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
  • 2,408
  • 2
  • 18
  • 41
3
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
8 9