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
1 answer

Can I count the precedence relation if all the paths on the same set of nodes

The path is representing for users' browse history. I'm considering which design structure should I take. For example, the red path means the user has browsed [page A]-> [page B]-> [page B]-> [page C]-> [page B]-> [page A] the blue path means the…
newBike
  • 14,385
  • 29
  • 109
  • 192
0
votes
1 answer

Optimizing py2neo's cypher insertion

I am using py2neo to import several hundred thousand nodes. I've created a defaultdict to map neighborhoods to cities. One motivation was to more efficiently import these relationships having been unsuccessful with Neo4j's load tool. Because the…
NumenorForLife
  • 1,736
  • 8
  • 27
  • 55
0
votes
1 answer

Error running cypher query with Python 3.4

When I run in Python 3.4 with PyNeo 2.0.7 & Neo4J 2.2.1 I got this error TypeError: 'str' object is not callable but it seems right according PyNeo documentation here (http://py2neo.org/2.0/cypher.html) from py2neo import …
Stefano Gatti
  • 43
  • 1
  • 6
0
votes
1 answer

How do I calculate all the relationship properties with py2neo or cypher query language

The model is for recording all the browse history How could I summation/average/find_max/find_min for all the pages browse to page 2 The expected answers are summation all the browsed time to page2 : 100+200+300+500 find_max browse time to page2 :…
newBike
  • 14,385
  • 29
  • 109
  • 192
0
votes
1 answer

Choosing between py2neo and bulbs

I would like to continue the discussion started here to evaluate these drivers: bulbs or py2neo. Have there been any comparisons that helps one choose between the two? This page would be greatly improved with these kinds of comparisons.
NumenorForLife
  • 1,736
  • 8
  • 27
  • 55
0
votes
1 answer

Py2neo - Rollback to previous state

I need a way to reach a previous state of the graph (i.e undo X number of changes). Is it possible to store the data, so that later you can replace the graph by that copy? Or is it possible to export the graph to a file and then load a graph from…
0
votes
1 answer

Output py2neo recordlist to text file

I am trying to use python (v3.4) to act as a 'sandwich' between Neo4j and a text output file. This code gives me a py2neo RecordList: from py2neo import Graph from py2neo.packages.httpstream import http http.socket_timeout = 9999 graph =…
Andy Herd
  • 95
  • 1
  • 8
0
votes
1 answer

Multiple Items into one pipeline -- NEO4J database with scrapy use case

I use scrapy in order to scrape a social network and then get the data in a NEO4J database. My challenge here is to relate 2 items each other: class person(scrapy.Item): name=Field() class AnotherPerson(scrapy.Item): name=Field() I want to save…
M. Mayouf
  • 31
  • 1
  • 3
0
votes
1 answer

how do I abort a query in py2neo?

I'm developing a web app that is basically a GUI to this Neo4j dataset we have here at my organization. The app is in Python (I'm using Flask+Tornado) and I'm using py2neo to connect to Neo4j. Things work fine, but sometimes a query will take too…
Parzival
  • 2,004
  • 4
  • 33
  • 47
0
votes
1 answer

Declare a unique constraint for Neo4j relationships dependent on direction (ideally with py2neo)

Is there an alternative to py2neo's create_unique method for relationships that takes direction into account? Such that uniqueness === same nodes, same label, and same direction? A solution for Py2neo would be ideal, but I wouldn't be opposed to…
bsuire
  • 1,383
  • 2
  • 18
  • 27
0
votes
1 answer

Update neo4j node with new relations, using py2neo

My code adds nods and creates relations. It updates when the connection is a->b, a->c, a->d, it works(to node a new relations are added), but when I add connection f->a then a second node with name a is created. How can I make it to update the…
Andrejs
  • 130
  • 5
0
votes
0 answers

How to import semi-structured data into neo4j by py2neo

I have 200 CSV files and I want to import them to neo4j; the data are stored in all kinds of tables in CSV, meaning, different structures of tables storing same type of data. They are like: Table 1 A B C 1 2 3 Table 2 A 1 B 2 C 3 Table 3 …
user2775888
  • 39
  • 10
0
votes
1 answer

py2neo query for calculating betweenness error

I want to calculate betweenness in a very large graph in neo4j using py2neo. I am using a cypher query like this: MATCH p=allShortestPaths((source:DOLPHIN)-[*]-(target:DOLPHIN)) WHERE id(source) < id(target) AND length(p) > 1 UNWIND…
Mohit Mangal
  • 89
  • 1
  • 5
0
votes
0 answers

batch insert in neo4j using py2neo 2.0

I have written this function to insert data as batch but while adding labels I am getting BindError: Local entity is not bound to a remote entity. def bulkInsertNodes(n=1000): graph = Graph() btch = WriteBatch(graph) nodesList = [] …
user3382968
  • 378
  • 4
  • 16
0
votes
2 answers

neo4j -changing node properties

I'm trying to make a social network and its my first web experience. I'm using Neo4j database and py2neo module. Now I want to find a node from my database and change some of it's properties. I'm using the code below,and i can run it with no errors…
ali73
  • 415
  • 1
  • 5
  • 17