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

Graph traversal using py2neo

I want to retrieve all the relationships and nodes present between two nodes from the graph I created using neo4j. I am using py2neo and I want to know how can we write a cypher query which can retrieve intermediate relationships between two nodes…
1
vote
0 answers

How Do I change the value of my Bolt_port? --ServiceUnavailable: Failed to establish connection to ('127.0.0.1', 7687) (reason [WinError 10061]--

I'm new here, I hope I will ask my question right: I work on python with the py2neo package and I'm incapable of connecting to my neo4j Graph database. It had been working perfectly, but at some point it stopped working (also for scripts that had…
Marciemarc
  • 11
  • 2
1
vote
1 answer

Py2neo (V4) - CypherSyntaxError: Variable `$x` not defined

I am trying in the absolute simplest way I can think of to create a node in my neo4j database using py2neo. Here is an example: from py2neo import Graph, Node db = Graph() node = Node('band', name='The Yeah Yeah Yeahs') db.create(node) With this…
Dumas.DED
  • 466
  • 5
  • 17
1
vote
1 answer

How to retrieve property values of a node in py2neo

I,m creating a graph database of geometric shapes and nodes contain a property called "type" to indicate whether that shape is a Triangle, Circle or square.I want to retrieve the type of every node and use it in IF condition as follow. Results =…
Chandi jbw
  • 13
  • 3
1
vote
1 answer

Why there are same node in path in my query in neo4j?

There is cypher sql like this: match p=(:Devices{name:"123.123.123.123"})-[r:Cost*..6]->(:Devices{name:"123.123.123.124"}) with p return p; Then it's return: {u'p': (123.123.123.123)-[:Cost {Cost: 21}]->(123.123.123.120)-[:Cost {Cost:…
user8608946
  • 79
  • 1
  • 1
  • 6
1
vote
3 answers

cypher query in py2neo to update n Nodes with a list of n ids and parameters

Say I want to update a sizeable amount of already existing nodes using data that, for instance, is stored in a pd.Dataframe. Since I know how to write a parametrized query that will handle a single node update, my basic solution is to set this query…
HerrIvan
  • 650
  • 4
  • 17
1
vote
1 answer

How to merge nodes and relationships using py2neo v4 and Neo4j

I am trying to perform a basic merge operation to add nonexistent nodes and relationships to my graph by going through a csv file row by row. I'm using py2neo v4, and because there is basically no documentation or examples of how to use py2neo, I…
Aaron Bramson
  • 1,176
  • 3
  • 20
  • 34
1
vote
1 answer

'authenticate' missing from py2neo

I have a smoothly running python project where I use the line from py2neo import Node, Relationship, Graph, authenticate, cypher However, when I moved the files to another machine and tried to run them there, it turned out that 'authenticate'…
vanhemt
  • 165
  • 10
1
vote
0 answers

Model source informations to maximize query performance

I am wondering about the best way (in terms of performance) to model data sources in Neo4j. Consider the following scenario: We are joining different datasets about the music domain in one graph. The data can range from different artists and styles…
blackmamba
  • 141
  • 1
  • 6
1
vote
1 answer

Use py2neo to return nodes from Cypher query

I am trying to do a basic retrieval of a node from my Neo4j database using py2neo and a cypher call, but I can't find any examples of working code for py2neo v4.1 and the documentation has no real descriptions, examples, helpful information, or…
Aaron Bramson
  • 1,176
  • 3
  • 20
  • 34
1
vote
2 answers

How to print the relationship types contained in a graph

Here is another basic question for some basic functionality of py2neo (v4) that does not work in the intuitive way. How to get/print the list of existing relationship types? In the documentation's graph section of the database page there is a…
Aaron Bramson
  • 1,176
  • 3
  • 20
  • 34
1
vote
1 answer

python code works fine on python shell but not through cmd when importing py2neo

as said in the title I'm having problem runnig my code from cmd which is working just fine in python shell. I have py2neo version 4. here is my code: from py2neo import Graph print ("passed") here is the output from python shell: passed >>> here…
Fatemeh Rahimi
  • 458
  • 5
  • 20
1
vote
0 answers

neo4j insert complicated json with relationship between nodes for same

This is going to be little complex I am trying to save a json with nested array structure. I have the json like below which I am trying to save JSON LINK Is there a possibility to save the above json with cypher query, because previously I tried…
Ashwin S
  • 165
  • 2
  • 11
1
vote
0 answers

Use Cypher Bolt Statement Result Directly in py2neo

I have been experimenting with the neo4j library in python, but would like to use some of the functionality provided by py2neo. Currently, I open the driver and session directly from GraphDatabase of neo4j.v1 and use session.run() to execute graph…
user2514157
  • 545
  • 6
  • 24
1
vote
1 answer

py2neo: cannot create graph

I wanted to experiment with py2neo, but cannot even use the code samples from the documentation. See here for example. The code is: from py2neo import Graph, Node, Relationship g = Graph() tx = g.begin() a = Node("Person",…
FlatronL1917
  • 189
  • 1
  • 7