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

Trouble with Understanding Merge on Py2neo

I want to create relationship between two existing nodes of different type in py2neo v3, can this only be done using the Cypher execution or is there a function(perhaps merge) that should do this? E.g. from py2neo import Graph, Path, authenticate,…
Ben Squire
  • 155
  • 2
  • 10
2
votes
2 answers

Import JSON to NEO4J using py2neo

I am trying to import a JSON file obtained thru an API request to StackOverflow to NEO4J. I have been following this tutorial. However, I get errors like the following while trying to execute the query: File…
Ahmadov
  • 1,567
  • 5
  • 31
  • 48
2
votes
0 answers

Multicore processing on Neo4j

I'm currently running a script in python to make inserts and deletes however these need to be done in order so I can't use python's multiprocessing. The script spend 95% most of time executing cypher commands and only uses 1 core. Is there a way…
Rhys
  • 377
  • 6
  • 16
2
votes
2 answers

using python datetime type in BOLT neo4j-driver throws an error. workaround available?

Here is a simplified example of code that I want to run under BOLT and that I was able to execute uner py2neo timeCreated = datetime.datetime(year=2016, month=6, day=15, hour=23) driver = GraphDatabase.driver("bolt://localhost",…
Goofball
  • 735
  • 2
  • 9
  • 27
2
votes
1 answer

Setting up a decision tree in neo4j

Say I have a decision tree that looks like this: I've written a cypher query to create that decision tree: create (_0 {`name`:"Spins?", `type`:"split"}) create (_1a {`name`:"Weight", `type`:"split"}) create (_1b {`name`:"Weight",…
2
votes
0 answers

Neo4j 3.0.1 - Neomodel 2.0.7 - Parameter provided for node creation is not a Map

I am trying out the Neomodel Source Code to make it work with Neo4j 3.0.1. I am facing this eeror saying that the Parameters provided for node creation is not a Map. {u'errors': [{u'message': u'Parameter provided for node creation is not a Map',…
Jack Daniel
  • 2,527
  • 3
  • 31
  • 52
2
votes
2 answers

How to get a dictionary or list from

Using py2neo to connect to neo4j DB: How can I convert "class 'py2neo.database.Record'" to a dictionary or list in python?
Birish
  • 5,514
  • 5
  • 32
  • 51
2
votes
1 answer

Loading data to neo4j from XML using py2neo

Im trying to load data to neo4j db from xml file using py2neo this python script works fine but its too slow since Im adding the nodes first then the relationships with two exceptions handlers. besides that the XML file size is around 200MB. Im…
Zingo
  • 600
  • 6
  • 23
2
votes
1 answer

Cypher load csv with python

I have established a graph database using batch import tool for Neo4j. The data I am working on is generated every day so I need to update my graph database daily. Running the batch import is not a solution as it will clean and upload entire data…
Nitin Kumar
  • 361
  • 1
  • 4
  • 4
2
votes
2 answers

Modify or change relationship properties in py2neo

Is there a way to change a relationship property once it has been set using py2neo or cypher? I'm creating an inventory tracker and once an item is "CHECKED_OUT" a property called "status" in the relationship is set to "True". Ideally, once the item…
2
votes
2 answers

Create multiple nodes and relationships in several Cypher statements

I want to create multiple neo4j nodes and relationships in one Cypher transaction. I'm using py2neo which allows issuing multiple Cypher statements in one transaction . I thought I'd add a statement for each node and relationship I…
zmbq
  • 38,013
  • 14
  • 101
  • 171
2
votes
3 answers

how to create relation between existing two node, I'm using neo4j.

I'm in starting neo4j and I'm using python3.5 and py2neo. I had build two graph node with following code. and successfully create.[! >>> u1 = Node("Person",name='Tom',id=1) >>> u2 = Node('Person', name='Jerry', id=2) >>> graph.create(u1,u2) after…
eachone
  • 557
  • 3
  • 11
  • 28
2
votes
2 answers

How to get all nodes connected to one node in neo4j graph in py2neo

I want to pick a node and get all of the nodes that are connected to it by relationship. Even this they are nth degree connections. What is the py2neo or simply cypher query for this?
Nicky Feller
  • 3,539
  • 9
  • 37
  • 54
2
votes
5 answers

See if node exists before creating in NeoModel

How do I check to see if a node exists before creating it in neomodel? Is there a way other than filter that will optimize my code?
Rob
  • 3,333
  • 5
  • 28
  • 71
2
votes
1 answer

Import TSV data into Neo4j using import tool

I am trying to import a large dataset into my local Neo4j instance. I am trying to use the import tool but so far with no success. Due to the size of my data I can't use Cypher or "LOAD CSV WITH HEADERS" approach (also my data has no headers). I am…
matjaz.moser
  • 333
  • 4
  • 16