Questions tagged [py2neo]

Py2neo provides Python bindings for the Neo4j graph database via its REST web service interface.

Py2neo provides Python bindings for the Neo4j graph database via its REST web service interface. With more detailed information available from py2neo.org, the source code can be found on GitHub and an installable package from the Python Package Index.

The library provides both in-depth support for the Cypher query language as well as the Geoff graph data notation.

729 questions
4
votes
2 answers

Neo4j - NOT PART OF CHAIN! RelationshipTraversalCursor

For my data import I suddenly get the following error: neo4j.exceptions.DatabaseError: NOT PART OF CHAIN! RelationshipTraversalCursor[id=328769435, open state with: denseNode=false, next=328769435, mode=regular, underlying…
Rich Steinmetz
  • 1,020
  • 13
  • 28
4
votes
1 answer

py2neo v3 AttributeError: object has no attribute 'db_exists'

Trying to import data to a clean neo4j graph database using py2neo version 3. I've defined several node types as below, and everything seemed to be going well – except that I wasn't seeing the nodes show up in my neo4j browser. Here's the relevant…
4
votes
2 answers

py2neo graph.merge() behaves differently from Cypher MERGE?

So, for an empty database MERGE (N1:A {name:"A"})-[:r]->(N2:B {name:"B"}) will create two nodes N1 and N2 with an edge r between them. The following python code however does not do that... but why? Should it not? from py2neo import Graph,…
lo tolmencre
  • 3,804
  • 3
  • 30
  • 60
4
votes
1 answer

Neo4j parent-child relationship

I have a node and I need to find all parent relationship to it till root. So, if I have: A->B->C->D(root) A->E->F->D(root) A is the node I have and I need all the ancestors of it. I tried the cypher query: MATCH (n:yo…
blackmamba
  • 1,952
  • 11
  • 34
  • 59
4
votes
2 answers

Neo4j Python py2neo authorization error

Installed Neo4j 2.2.3 on Windows 8.1. Nothing special. Started the server through the Neo4j start app. Nothing special Started working with py2neo as in the documentation on Neo4j.org. Ran into an authorization error I cannot explain. Log follows…
Fred Ottenhof
  • 51
  • 1
  • 3
4
votes
1 answer

Inserting large graph data into Neo4j using py2neo WriteBatch

I have a graph represented by the following files: VertexLabel.txt -> each line contains properties for each vertex. EdgeLabel.txt -> each line contains properties for each edge. EdgeID.txt -> each line contains 3 separated integers which…
Aaron
  • 1,693
  • 4
  • 26
  • 40
4
votes
1 answer

The most appropriate way to use Neo4j from Python in 2015

I'm using latest community Neo4j (2.2.0-M03) for storing my graphs. I'm interested in accessing it from Python. According to the official Neo4j documentation, there are several alternatives. From what I have understood by checking the docs, playing…
redsk
  • 261
  • 6
  • 11
4
votes
4 answers

how to pass parameter to cypher query in py2neo

I have a variable name="Rahul" and, I want to pass this variable to cypher query in Py2neo in the following manner: line=session.execute("MATCH (person)WHERE person.name=name RETURN person") but i am getting an error -…
Saubhagya Jena
  • 141
  • 1
  • 2
  • 3
4
votes
1 answer

Working with indexes in neo4j and py2neo

I have just started working with py2neo and neo4j. I am confused about how to go about using indices in my database. I have created a create_user function: g = neo4j.GraphDatabaseService() users_index = g.get_or_create_index(neo4j.Node, "Users") def…
Vaibhav Aggarwal
  • 1,381
  • 2
  • 19
  • 30
4
votes
1 answer

Cypher query in py2neo

How do I perform the functions of shortestPath() and allShortestPaths() in py2neo? In Cypher, I'd execute something like: START beginning=node(4), end=node(452) MATCH p = shortestPath(beginning-[*..500]-end) RETURN p I've tried what I thought was…
jvc26
  • 6,363
  • 6
  • 46
  • 75
4
votes
2 answers

Creating neo4j graph database from csv file using py2neo

I am currently working in a doctoral program and i am interested about Py2neo, so I am using it in order to perform some experiments using social graphs. However I got into newbie troubles. Excuse me for asking these simple questions. I got a xml…
hjmnzs
  • 131
  • 2
  • 14
3
votes
2 answers

How to use ngrok to expose neo4j instance running on localhost to be used by google colab?

I am trying to use my local neo4j server through google colab. I am using ngrok to expose the port using command: ngrok http 7687. It gives something like this: ngrok is working fine. But When trying to connect using colab, I am getting the…
Paras Gupta
  • 99
  • 1
  • 6
3
votes
1 answer

Getting "TimeoutError: [Errno 110] Connection timed out" in py2neo when neo4j db is exposed through loadbalancer

I have deployed neo4j community edition(version 4.0.0) in k8s and it has been exposed (bolt and browsers) through nginx-ingress and a load balancer. Now when tried to connect to this db using py2neo(version latest), its working fine. But I got…
Taybur Rahman
  • 1,347
  • 8
  • 20
3
votes
1 answer

How can I randomly walk between nodes by weights in Neo4j with Python?

I've created nodes in Neo4j with the following code, from py2neo import Graph, Node, Relationship g = Graph(password='neo4j') tx = g.begin() node1 = Node('Node', name='Node-1') node2 = Node('Node', name='Node-2') node3 = Node('Node',…
E. Zeytinci
  • 2,642
  • 1
  • 20
  • 37
3
votes
1 answer

How to use dictionary parameters in Python Neo4J

I am using py2neo to run a Cypher query in Python. Currently, I am passing the values of $user_id and $name. query = "MATCH (user:User{id:$user_id, name: $name}) MATCH (user)-[rout]->() WITH user, collect(DISTINCT {relationship: type(rout), node:…
Vivek Maskara
  • 1,073
  • 11
  • 29
1 2
3
48 49