Showing results forΒ 
Search instead forΒ 
Did you mean:Β 

Working on multiple databases with py2neo/Neo4j python driver

Node Link

Hi All,
In our application we need to work with multiple database in neo4j cluster (one database per customer).
We noticed that in the basic Neo4j driver doesn't we cannot change the database name parameter, so we start working with py2neo(v5, pre-release) module which support database name as parameter:
py2neo.Graph(self.uri, user=self.user, password=self.password, name=self.database)
But now we have different issue,py2neo doesn't support on bolt+routing protocol so if we are trying to connect to one of the servers in the cluster which is not the leader and trying to create/delete nodes we get an error message which writing changes to follower database is not allowed.
So it's seems there is no python module which gives a full support on multi databases in neo4j cluster.

Is this a know issue ?
Are you planning to add multi database support in the Neo4j driver for python?
is there any other programming language which have a module which support this kind of case?

Thanks πŸ™‚


Node Link

If you have Neo4j community version, you can use only one database.

Using the official neo4j 4.0 driver, you can create a session this way:

driver = GraphDatabase(uri, auth=(user, password))
session = driver.session(database="TheOtherDb")

See the new

Node Link

Thank you very much !!

Nodes 2022
NODES 2022, Neo4j Online Education Summit

OnΒ November 16 and 17 for 24 hours across all timezones, you’ll learn about best practices for beginners and experts alike.