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
0
votes
2 answers

Neo4j adding json as relationship, Invalid input '{':

I'm using py2neo cypher to load relationship between nodes. I would like to use a json object as this relationship, so I can query it later. Here is my cypher query: MATCH (a:OntologyNode),(b:OntologyNode) WHERE a.cid = 'abcat1' AND b.cid =…
jKraut
  • 2,325
  • 6
  • 35
  • 48
0
votes
1 answer

difference between two cypher queries

I am trying to run these two cypher queries and I am not understanding the difference between them. The purpose here is to find multiple paths between given two nodes such that the sum of transit_time in that path is in ascending order. Q1 : MATCH p…
Pratik Gujarathi
  • 929
  • 1
  • 11
  • 20
0
votes
1 answer

No results from load2neo bulk load -curl POSTcomand

I'm trying to insert a lot of data into my neo4j db. After reading some opinions I've decided to use load2neo to do so. I've parsed my data in the geoff format. Inserted the line…
Lucas Azevedo
  • 1,867
  • 22
  • 39
0
votes
1 answer

Retrieve NodePointer.properties that was not inserted into DB yet

I'm using py2neo to insert some data into my neo4j db. I create arrays of NodePointers and Relations and insert them with for i in rels: test_graph.create(i) after the process. During the creation of my arrays I would like to check if a…
Lucas Azevedo
  • 1,867
  • 22
  • 39
0
votes
2 answers

py2neo graph.node(ID) throws "Unsupported URI scheme"

I am iterating over this record returned by cypher.execute(): | p ---+---------------------------- 1 | (:A)-[:r]->(:B)-[:r]->(:C) The code I use to iterate over it is this: recordList = graph.cypher.execute(
lo tolmencre
  • 3,804
  • 3
  • 30
  • 60
0
votes
0 answers

py2neo expand graph by accessing nodes from execute() record

As I have learnt from another question it is apparently not possible in Cypher alone to copy a subgraph or to duplicate a chain of nodes. But I need to do this somehow. Therefor I looked for a more hacky approach to do this. Specifically I need to…
lo tolmencre
  • 3,804
  • 3
  • 30
  • 60
0
votes
2 answers

How do I stop py2neo watch()?

I run this earlier in the code watch("httpstream") Subsequently, any py2neo commands that triggers HTTP traffic will result in verbose logging. How can I stop the effect of watch() logging without creating a new Graph instance?
Hanxue
  • 12,243
  • 18
  • 88
  • 130
0
votes
1 answer

Neo4j - SET list of labels to a node using CYPHER, reading the list from json file

I have a basic operation to do with neo4j Cypher from py2neo. I have to read objects from json, where json object structure looks like { "ip":"0.0.2.2", "location":"uk", "uptime":"30", …
Jack Daniel
  • 2,527
  • 3
  • 31
  • 52
0
votes
1 answer

Build community in Neo4j via python

I have an neo4j graph. I wish to do community detection and other graph analysis such as betweeness and closeness through python programming. I used py2neo to connect and query Neo4j. I dont know how to convert py2neo results so that python-igraph…
Hamsavardhini
  • 101
  • 2
  • 7
0
votes
1 answer

Transactions using neomodel

Based on what is said in the docs the following is available: @db.transaction def update_user_name(uid, name): user = Person.nodes.filter(uid=uid)[0] user.name = name user.save() But how about something more complex like creating a node…
kboom
  • 2,279
  • 3
  • 28
  • 43
0
votes
1 answer

Why does this query returns empty?

I have a flask application using py2neo that shows groups. I am trying to make the URL more pretty, so I found these two articles: one about how to generate slugs and another one on how to create custom converters. I combined those articles to make…
Chris Duncan
  • 721
  • 1
  • 6
  • 21
0
votes
2 answers

py2neo, create a node ? two ways?

I am confused as what is the difference between below two ways to create a node ? It seems like the result is the same; from py2neo import Graph graph = Graph() graph.cypher.execute("CREATE (a:Person {name:{N}})", {"N": "Alice"}) # a graph.create(…
0
votes
2 answers

py2neo, why do we need to do push/pull/commit .. etc ? Is that something we need to do in the actual python program ?

In the website Introduction to Py2neo 2.0 http://py2neo.org/2.0/intro.html why do we need Pushing & Pulling ? also graph.cypher.begin() and commit(). as below tx = graph.cypher.begin() for name in ["Alice", "Bob", "Carol"]: tx.append("CREATE…
0
votes
1 answer

Read data modified in same transaction which is not yet commited

I'm trying to introduce a transaction using py2neo. At the beginning of the code to be transactional I open new transaction using: tx = graph.cypher.begin() after that there are several actions taken: Read some data already stored in the database…
kboom
  • 2,279
  • 3
  • 28
  • 43
0
votes
1 answer

How to best store/access node id's in neo4j/py2neo/python?

I'm new to neo4j and graph databases in general, so this might be a dumb question, but what is the best way to refer to nodes by id, or else what is the best way to form a relation between an existing node and a recently inserted one? Right now, I…
antikantian
  • 610
  • 1
  • 4
  • 11