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

CypherResults py2neo get node object

i need to get the id of a node in neo4j using py2neo. using the following query i am getting a cypher result object which contains a record object table_query = neo4j.CypherQuery(db, "merge (x: Table{name: 'table_param'}) return x") the contents…
someguy
  • 13
  • 2
0
votes
1 answer

Neo4j path traversal - path progress dependent on relationship attribute

I've been just looking into neo4j in a bit of spare time, using the py2neo bindings for python. I'm interested in the pathfinding aspect of neo4j. For the purposes of learning I've been creating a simple game-map graph (solar systems, and internal…
jvc26
  • 6,363
  • 6
  • 46
  • 75
0
votes
1 answer

Transferring data from MySQL to Neo4j

We're in the process of migrating our MySQL based Django application to Neo4j. In MySQL, we have a Providers table and a Referrals table. The referrals table simply has a provider_from_id, provider_to_id, and a count column. It represents the…
Leah Sapan
  • 3,621
  • 7
  • 33
  • 57
0
votes
1 answer

Can indexes be created in batches using py2neo

I am using py2neo to upload the initial data into neo4j and am using batches to make it faster. I was wondering if there is a way to create indexes too using batches. Thanks
gaurav.singharoy
  • 3,751
  • 4
  • 22
  • 25
0
votes
2 answers

py2neo - UnicodeEncodeError in query

I'm getting am error when querying neo4j using py2neo, and cant seem to solve it. My code: data, metadata = cypher.execute(self._db, 'START s=node:pages(title="%s") MATCH (s)-[r]->(n) RETURN n.title' % topic) And the error File…
user1491915
  • 1,067
  • 1
  • 14
  • 19
0
votes
2 answers

Insert text data into Neo4j using py2neo

I want to insert data from a text file into Neo4j using py2neo.But is their a way to check before creating node that it already exist.Is their any py2neo way for CREATE UNIQUE For example create node A to B create node A to C Then only single node…
Vaibhav Jain
  • 5,287
  • 10
  • 54
  • 114
0
votes
1 answer

find the group in Neo4j graph db

I am using Neo4j for my project. In my graph DB I have 2 types of nodes: person fruit person nodes may be connected with each other with relation friend person nodes are connected with the nodes of fruits if they like that fruit. I want to find…
danny
  • 65
  • 1
  • 8
0
votes
1 answer

py2neo: depending batch insertion

I use py2neo (v 1.9.2) to write data to a neo4j db. batch = neo4j.WriteBatch(graph_db) current_relationship_index = graph_db.get_or_create_index(neo4j.Relationship, "Current_Relationship") touched_relationship_index =…
user2752625
  • 83
  • 2
  • 9
0
votes
1 answer

Py2neo cypher query return instance method

Using the py2neo tutorial (http://book.py2neo.org/en/latest/cypher/): from py2neo import neo4j, cypher graph_db = neo4j.GraphDatabaseService() query = "START a=node(1) RETURN a" data, metadata = cypher.execute(graph_db, query) a…
Olga Mu
  • 908
  • 2
  • 12
  • 23
0
votes
1 answer

Py2neo - creating relationships in writebatch

I use py2neo to dump data in a Neo4j database. With this batch = neo4j.WriteBatch(graph_db) batch.create(node(name="Alice")) batch.create(node(name="Bob")) batch.create(rel(0, "KNOWS", 1)) results = batch.submit() I can create relationships using…
0
votes
1 answer

Py2neo - get node by id throws error when executed?

I was using python neo4j rest client in a project and just switched to Py2neo. I tried to get a node from the database by its ID but got the following error : AttributeError: 'GraphDatabaseService' object has no attribute 'get_node' I used…
Anas
  • 437
  • 6
  • 19
0
votes
0 answers

py2neo can't create relationship for indexed nodes?

I'm using py2neo 1.5.1 and neo4j 1.9.1. The following code throws a lot of errors due to the create relationship line, based on my testing. Can anybody explain why? from py2neo import neo4j,node,rel graph_db =…
Joe
  • 41
  • 3
0
votes
1 answer

Py2Neo: Cypher Query

I am trying to make the following Cypher query: start me = node:actors(actor = 'Tom Baker') , you = node:actors(actor = 'Peter Davison') match p = you-[*1..3]-me return p using the Dr.Who dataset available in the neo4j site. It gives correct…
0
votes
2 answers

Relation in Py2neo with Neo4j

How can i get the end node of the relation. For example: rels = graph_db.match(start_node=user, rel_type="is_post_owner") So how can i get all the end nodes of the start node user. Regards, Samuel
0
votes
1 answer

Neo4j: get index property 'name' in cypher query as a return value

Hi I'm new to neo4j and cypher. I've built my database such that there are multiple depths in the graph you can start at. In my example the graph is a tree the root node is an index and nodes at level 4 are indices. I'm using py2neo to develop the…
user2343996
  • 153
  • 4