cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Working on multiple databases with py2neo/Neo4j python driver

dan3
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 🙂

2 REPLIES 2

jpek-m
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 https://neo4j.com/docs/api/python-driver/current/api.html

dan3
Node Link

Thank you very much !!