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

Type mismatch when importing JSON into Neo4J with Py2Neo

I have a JSON file, the head of which looks like this: "exports": { "type": "WordsAndPhrases", "date": "2018-08-02T10:07:58.047669Z", "relevantYears": "2012,2013,2014,2015,2016,2017", "Words": { "H1":…
DanielH
  • 176
  • 1
  • 16
1
vote
1 answer

Drawing graph with labels in networkx obtained from a py2neo query

I am running some data analysis with a Jupyter notebook where I have a query with a variable length matching like this one: MATCH p=(s:Skill)-[:BROADER*0..3]->(s) WHERE s.label='py2neo' or s.label='Python' RETURN p I would like to plot its result…
HerrIvan
  • 650
  • 4
  • 17
1
vote
1 answer

Neo4J: checking if list elements are featured in matched nodes

My Neo4j query is not working - and I can't quite figure out why. match (entry:Entry) with split("\some space delimited string", " ") as i, split("\some space delimited string", " ") as j where (any (x in entry.X.list where x in i) and any(y in…
1
vote
1 answer

Getting alphanumeric reference of nodes in py2neo, when looking for paths

I have a graph that consists of DATASET and GRAPH nodes. With the following relationships: DATASET->READS->GRAPH GRAPH->WRITES->DATASET When I run the following : MATCH (p1:DATASET_NAME { name:'test1.dat' }),(p3:DATASET_NAME { name:'test32.txt' }),…
feynmanium
  • 159
  • 2
  • 13
1
vote
0 answers

Selecting all connected nodes to a given node and listing relationships in py2neo

I have recently started working on py2neo for neo4j database, and avoiding using cypher queries. I am looking forward to know how to select all the nodes connected to a given node and select the relationships between this given node and connected…
harshvardhan
  • 765
  • 13
  • 32
1
vote
3 answers

connection error py2neo, python 3, win10 64-bit

I'm trying to connect to the Neo4j server using the tutorial commands however I get the following error: from py2neo import Graph g = Graph(host='localhost', port=7687) tx = g.begin() a = Node("Person", name="Alice") tx.create(a) b = Node("Person",…
user3701979
  • 351
  • 3
  • 9
1
vote
1 answer

What is correct Cypher Syntax?

I refer to Neo4j create nodes and relationships from pandas dataframe with py2neo and code with belows. But I got py2neo.database.status.CypherSyntaxError. Please verify below is right approach and let me know what is correct Cypher syntax. My…
Sun Park
  • 13
  • 2
1
vote
2 answers

Building relationships in Neo4j via Py2neo is very slow

We have 5 different types of nodes in database. Largest one has ~290k, the smallest is only ~3k. Each node type has an id field and they are all indexed. I am using py2neo to build relationship, but it is very slow (~ 2 relationships inserted per…
John Li
  • 43
  • 6
1
vote
0 answers

creating a node with different labels in py2neo ogm

I was asking myself if it is possible to create a node with different labels with the ogm in py2neo. cypher: CREATE(n:label1:label2{name:'testname'}) RETURN n py2neo ogm: class label(GraphObject): __primarykey__ = "name" …
resc
  • 19
  • 8
1
vote
0 answers

How to avoid error converting Cypher Query into NetworkX Graph in Python

I want to convert the results of a Neo4j Data into Graph in Python using py2Neo. The below link provides a detail program code: http://nicolewhite.github.io/neo4j-jupyter/hello-world.html import networkx as nx %matplotlib inline results = %cypher…
1
vote
1 answer

Best way of keeping track of logs within a relationship in neo4j

I am frankly quite new at using Neo4j. After reading through a lot of the documentation I was wondering what would be the best way of storing visit "logs" with a datatype such as a timestamp? For instance, I have the following…
Phil
  • 13
  • 3
1
vote
0 answers

Connect via py2neo to a neo4j with password secured http protocol

Hello I am trying to connect to a neo4j database with py2neo. This code works so far: graph = Graph(bolt=True, host='***', bolt_port=***, http_port=***, user='***', password='***') But when I…
1
vote
1 answer

How to create conditional edge among nodes in neo4j?

I am trying to create edges between nodes that share properties in neo4j. Each node has 5 properties say a,b,c,d,e. If 2 nodes share only property 'a' then edge will have name as 'a'. If 2 nodes share properties b,d,e then edge will have name as…
Neo
  • 4,200
  • 5
  • 21
  • 27
1
vote
1 answer

setting neo4j uniqueness constraints in py2neo v3

Using v2 py2neo I could put this in __init__.py graph.cypher.execute("CREATE CONSTRAINT ON (n:User) ASSERT n.username IS UNIQUE") Why does v3 py2neo graph.run("CREATE CONSTRAINT ON (n:User) ASSERT n.username IS UNIQUE") fail with this…
user1613312
  • 374
  • 2
  • 15
1
vote
1 answer

py2Neo.ogm shortestPath search not turning up results

I have implemented py2neo with ogm, however I cannot get the search functionality to work like it should. Below I have my cypher query (directly to the Neo4j db) with 'rpt_id' and 'country_code' as GraphObjects in the graph with those as the primary…
Tim Kralj
  • 21
  • 3