Questions tagged [neo4j-python-driver]

The Neo4j Python driver is officially supported by Neo4j and connects to the database using the binary protocol. It aims to be minimal, while being idiomatic to Python.

Neo4j is a highly scalable native graph database that leverages data relationships as first-class entities, helping enterprises build intelligent applications to meet today’s evolving data challenges. Neo4j's native graph storage and processing engine deliver constant, real-time performance. The Neo4j Python driver is officially supported by Neo4j and connects to the database using the binary protocol. It aims to be minimal, while being idiomatic to Python.

To install neo4j driver using pip execute the below command

pip install neo4j-driver==1.0.0
41 questions
1
vote
2 answers

Exception when writing transactions in Neo4j python driver: "neo4j.exceptions.AuthError: {code: None} {message: None}"

I am trying to run the example mentioned in the documents - https://neo4j.com/developer/python/#_resources class HelloWorldExample: def __init__(self, uri, user, password): self.driver = GraphDatabase.driver(uri, auth=(user,…
Om Rastogi
  • 478
  • 1
  • 5
  • 12
1
vote
0 answers

Neo4J python driver doesn't raise errors when ruuning into a docker container

I have a problem that is probably quite simple, but I can't find solutions by myself... I run two docker containers with docker-compose, one is a python server with fastapi, and another one the neo4j official image, with auth disabled (for dev…
rcepre
  • 192
  • 1
  • 14
1
vote
2 answers

Collections containing mixed types can not be stored in properties

I am new to Neo4j, I am trying to create a node like so: neo4_session.run("MERGE (t:Table {name: $name, columns: $columns}) ", name=table['table_name'], columns=[{'colname':'a'},{'colname':'b'},{'colname':'c'}]) Neo4j tells me…
user2471214
  • 729
  • 9
  • 17
1
vote
1 answer

Applying python packages graph-tools / network x on Neo4j database

I'm embarking on a self exploratory project regarding Neo4j database on the Panama Papers by ICIJ. Aim: I would like to run python packages that does network analysis such as graph-tool, networkx on the database that is found on Neo4j. Hence these…
Sherly
  • 75
  • 6
0
votes
1 answer

Neo4j python driver | AttributeError: 'Session' object has no attribute 'execute_read'

In the Neo4j Python code, I have an issue while query from Neo4j DB, with getting below error: AttributeError: 'Session' object has no attribute 'execute_read' I want to convert the results of cypher queries into a JSON format.I am using the neo4j…
Tono Kuriakose
  • 718
  • 6
  • 19
0
votes
1 answer

How to convert Neo4j response into JSON

Convert stream of records from NEO4j get by NEO4J python driver into JSON. simply, I want to convert the results of cypher queries in neo4j into a JSON format. Below is output got from NEO4J
Tono Kuriakose
  • 718
  • 6
  • 19
0
votes
2 answers

Neo4j Python REST API

Query via Python REST-APi message: Invalid input: ':' Hello, i am starting a query via my Python-Neo4j-Api. But the code ist not working, resulting in the the error message above. But the same query is working in the Neo4J Desktop App. Why is it…
Tim
  • 35
  • 4
0
votes
1 answer

Neo4j, Graph Data Science Python Library Scaling Functions

Does anyone know whether the scaling functions mentioned here https://neo4j.com/docs/graph-data-science/current/alpha-algorithms/scale-properties/ exist within the python library, if so how can I call them?
0
votes
1 answer

Neo4j graph blind search for any node and relationship containing an expression?

I am trying to build a blind search, given an expression/string. Using Python Neo4j driver I am running: from neo4j import GraphDatabase driver = GraphDatabase.driver("neo4j://localhost:7687") def query_engine(tx, query): res = tx.run(query) …
SteveS
  • 3,789
  • 5
  • 30
  • 64
0
votes
1 answer

Neo4j: creating relations from a pandas dataframe

I am very new into Neo4j, and have been trying to create nodes and relations from this Pandas dataframe for a while source target relation John California lives in Peter Utah. born in Oscar Canada. returns to I am trying to connect…
user840
  • 134
  • 1
  • 13
0
votes
0 answers

Use Python Driver to connect to a Neo4J behind a wepproxy

I would like to use the neo4j-python driver to connect to a remote neo4j enterprise instance (hosted on azure). My development machine is unfortunatly (due to corporate policy) behind a proxy. In other libraries and also in the neo4j desktop…
freddy
  • 108
  • 3
  • 9
0
votes
2 answers

Cypher How to use variables in a query

So, I have a tree of Person and I'm trying to query a subtree of a given node in the tree (root) and limit the subtree levels returned (max): with "A" as root, 3 as max match (a:Person {name: root})-[:PARENT*1..max]->(c:Person) return a, c But it's…
timidboy
  • 1,702
  • 1
  • 16
  • 27
0
votes
2 answers

Trying to Use neo4j.apoc to load json file as data into a graph using python

I am new to using neo4j through python. I wanted to use APOC to read in a json file using python and populate a graph database. The JSON file is already in a neo4j required structure to create nodes and relationships. When running the query CALL…
0
votes
1 answer

Add Word Embedding in Neo4j

Trying to add word embedding to my nodes using Unwind. The code: result = conn.query("MATCH (m:Word) WHERE NOT exists(m.embedding) RETURN m") nodes = [x['m'] for x in result] for dic in nodes: dic['embedding'] =…
Shkolar
  • 337
  • 7
  • 20
0
votes
0 answers

Failed to read from defunct connection (Jupyter notebook, python driver )

I try to import data into a Neo4j VM in Azure. This code works: def create_article(tx): tx.run("CREATE (a:ARTICLE)") session.read_transaction(create_article) But this code doesn't work: def create_node_article(tx, id, title, label): …
LJRB
  • 199
  • 2
  • 11