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

How to terminate a neo4j connection using py2neo?

I am creating a flask restful api to import data in to neo4j using Py2neo. As authentication is to be done in every request, I want my neo4j connection to be terminated at the end of each request such that subsequent requests with different auth…
Akash Tripathy
  • 117
  • 2
  • 6
5
votes
1 answer

neomodel giving Attribute error on save

I am running the following config for neo4j: neo4j - 3.0.0 py2neo - 2.0.8 neomodel - 2.0.2 Finally, the code I try to run is: class User(neomodel.StructuredNode): user_id = neomodel.IntegerProperty(unique_index=True, required=True) name =…
Sourabh Dev
  • 743
  • 11
  • 22
5
votes
1 answer

which python neo4j drivers are stable/production ready?

I've noticed that with neo4j v3.0 there are now 3 competing drivers: py2neo neo4j-rest-client neo4j's own (bolt) driver It seems that the first and third and developed by the same person, with the latter being a bit buggy and/or slow (at least…
StevieP
  • 1,569
  • 12
  • 23
5
votes
2 answers

Speeding Up creation of edges between Node in Neo4j using Py2Neo

I am trying to create a huge database in neo4j which will have around 2 million nodes and around 4 million edges. I have been able to speed up the node creation process by creating the node in the batches of 1000 nodes each. However, when I try to…
Pawan
  • 1,066
  • 1
  • 10
  • 16
5
votes
2 answers

Neo4j how to handle special characters like ” \ in Cypher statements

I am using py2neo to load JSON data into Neo4j as chyper statements. My problem is that sometimes there are signs as “ ‘ \ etc in the strings I want to import as properties to Nodes: MERGE (p:Node {name:’This sign ‘ gives error’}) If I change…
Jon
  • 51
  • 1
  • 1
  • 4
5
votes
3 answers

py2neo: Graph.find_one with multiple key/values

I have some trouble with the py2neo find and find_one (http://py2neo.org/2.0/essentials.html) What I want in Cypher is: MATCH (p:Person) WHERE p.name='Alice' AND p.age=22 RETURN p Say, where there are more than one key/value set (eg. if there are…
Thomas
  • 237
  • 4
  • 15
5
votes
1 answer

IncompleteRead error when submitting neo4j batch from remote server; malformed HTTP response

I've set up neo4j on server A, and I have an app running on server B which is to connect to it. If I clone the app on server A and run the unit tests, it works fine. But running them on server B, the setup runs for 30 seconds and fails with an…
philh
  • 636
  • 5
  • 19
5
votes
4 answers

py2neo how to retrieve a node based on node's property?

I've found related methods: find - doesn't work because this version of neo4j doesn't support labels. match - doesn't work because I cannot specify a relation, because the node has no relations yet. match_one - same as match. node - doesn't work…
user797257
5
votes
3 answers

Choices validation in WTForms does not update when database does

I understand the SelectField method in WTForms takes can argument choices which has the form... choices=[("value1", "display of value 1"), ("value2", "display of value 2")] I need to populate my choices based on a call to the database. I'm using…
Mittenchops
  • 18,633
  • 33
  • 128
  • 246
4
votes
2 answers

Py2neo (Neo4j) insert / create Relationships in bulk

Trying to insert many new Relationship on existing nodes. Current code is taking too much time for millions of Relationship. Is there a way to optimise the same? from py2neo import * g = Graph() nodes = NodeMatcher(g) for persons in relation: …
kunal
  • 35
  • 5
4
votes
1 answer

TypeError: Neo4j does not support PackStream parameters of type int64

I am writing a simple recommender system by using neo4j Graph Database. I use py2neo lib, this is my program: ... for m,row in movie.iterrows() : tx.run(statement1, {"A": row.loc['id'], "B": row.loc['title'], "C": row.loc['IMDb url']}) …
4
votes
2 answers

Neo4j Docker Connection failure

I am facing the neo4j connection issue while trying the run the neo4j code; the same working fine outside docker but failing to establish the connection with neo4j database while running inside docker. Error message: Traceback (most recent call…
Jack Daniel
  • 2,527
  • 3
  • 31
  • 52
4
votes
1 answer

How to Copy Sub-Graph in Neo4j using Cypher

I am trying to simulate a file system using Neo4j, Cypher, and Python(Py2Neo). I have created the data model as shown in the following screenshot. Type=0 means folder and type=1 means file. . . I am implementing functions like Copy, Move etc for…
Rajendra Kadam
  • 4,004
  • 1
  • 10
  • 24
4
votes
2 answers

Don't understand why this AttributeError: 'Graph' object has no attribute 'merge_one' is occurring

I'm following a tutorial, and I'm using the last python2 (homebrew) with PyCharm (with project interpreter configured) - But I'm stuck in this part: from py2neo import Graph, Node graph = Graph() nicole = Node("Person",…
bcloney
  • 193
  • 1
  • 10
4
votes
1 answer

ModuleNotFoundError: No module named 'neo4j.addressing' and ModuleNotFoundError: No module named 'neo4j'

I am getting this error. just from trying to run Graph() method. >>> import py2neo >>> graph = py2neo.Graph() Traceback (most recent call last): File "", line 1, in File "E:\Chibanggri\flask and…
Banchan Kiro
  • 43
  • 1
  • 6
1
2
3
48 49