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

py2neo using get or create in WriteBatch

I am just getting started with Neo4j and py2neo. I am experimenting with the batch feature available in py2neo for bulk data loading of a neo4j database. At a basic level, I want to create two nodes (or get them if they already exist) and create a…
Harry
  • 394
  • 2
  • 10
2
votes
1 answer

Searching for node in py2neo

Is there a way to search for a node with a specific property using py2neo? (I have a bunch of nodes with {"word": "some word"}, and I want to be able to search through nodes to find a node whose word attribute has a specific value)
chayrix
  • 51
  • 1
  • 5
2
votes
2 answers

using neo4J (server) from python with transaction

I'm currently building a web service using python / flask and would like to build my data layer on top of neo4j, since my core data structure is inherently a graph. I'm a bit confused by the different technologies offered by neo4j for that case.…
Ben G
  • 3,965
  • 3
  • 30
  • 34
1
vote
1 answer

How to check if graph.commit(tx) has updated records in py2neo

The py2neo cursor has attributes relating to if a query is writing data in cursor.summary() and cursor.stats() However this dictionary remains the same both before and after graph.commit(tx). How can I confirm that graph.commit(tx) has written…
cmf
  • 106
  • 1
  • 8
1
vote
0 answers

py2neo run call gds.graph.drop

enter image description here When I run cypher 'call gds.graph.drop' it will raise py2neo.errors.ProtocolError: Cannot decode response content as JSON Are you meet this error?
DarrenZhu
  • 11
  • 1
1
vote
1 answer

Create nodes and relationships in Neo4j with inputs as a pandas DataFrame with py2neo

I have the output as a pandas data frame. I am trying to write a cypher query to give this data frame as the input to Neo4j and create a graph with relations extracted from its source and target. If anyone has any idea on how to proceed further,…
S.Sushmi
  • 13
  • 3
1
vote
2 answers

How to display edges/nodes in neo4j with width/size according to some specified property?

I know how to display the value of properties with text on the edges/nodes. But I want to know if the width/size of edges/nodes can vary according to the property value. For example, the larger the transaction, the thicker the edge is on the graph.…
fchen92
  • 57
  • 5
1
vote
1 answer

How to create bulk node relationships using py2neo

I need to populate a database in neo4j using a json of the following that contains data of some processes. Among them the name of the process, its parents and its children (if any). Here is a part of the json as an example: [ { …
alejomarchan
  • 368
  • 1
  • 10
  • 20
1
vote
1 answer

Neo4js conditional information storage

I am new to graph database and stuck with the following issue. I'm trying to store below conditional information in the graph. when a=1 and b=2 then sum=3, when a=2 and b=3 then sum=5 and mul=6 Here there are 4 pre-conditions[(a=1, b=2),(a=2,…
1
vote
1 answer

py2neo Issue: ConnectionUnavailable: Cannot open connection to ConnectionProfile('bolt://localhost:7687')

I am trying to replicate this example on neo4j desktop: https://stellargraph.readthedocs.io/en/stable/demos/connector/neo4j/load-cora-into-neo4j.html I am able to reproduce everything until I get to the following line: import py2neo default_host =…
1
vote
1 answer

Graph query with py2neo OGM

I'm trying to use classes defined using py2neo to run graph queries on my database. Here's what I have so far: py2neo.ogm import Graph, GraphObject, Property, RelatedTo, Label gsb = Graph(address = "localhost:11004",…
Matt
  • 437
  • 2
  • 14
1
vote
1 answer

Creating Unique Node Relationships with Py2Neo from CSV

I have some data in csv format. Each row describes a relationship between two nodes. Nodes can have multiple relationships with other nodes, although there is only one relationship per row. For example this is a relationship derived from one row in…
Owais Arshad
  • 303
  • 4
  • 18
1
vote
1 answer

How to use Python variables in a Cypher statement when using py2neo

I want to get some path by using py2neo but I didn't find the right way, so I choose to use graph.run(), when I run the statements below: t='T1018' path1=graph.run("MATCH path=(m:attack{name:t})-[:next*1..2]->(n:attack) return path").to_series() It…
Baraa
  • 11
  • 1
1
vote
2 answers

py2neo NodeMatcher Predicates

Trying to use predicates with NodeMatcher()... am I doing something wrong here? In [24]: nodes = NodeMatcher(neodb) In [25]: nodes.match("Interface",…
chomezki
  • 11
  • 1
1
vote
0 answers

multiple python scripts accessing neo4j database

I'm using a Neo4j database (local community server) with my own graph and I'm doing some link prediction via python scripts. The graph is quite large so I outsourced the computing to a HPC Cluster. My Problem now is: on the cluster I'd like to run…
T-Man
  • 47
  • 9