Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
03-29-2020 03:51 PM
When using the newest version of py2neo with Neo 4.0.2 is there any way to specify that you want to connect to the non-default database?
e.g. I only have one Neo server and I want to have a 'dev' and a 'prod' graph on the same machine.
If this isn't possible with py2neo how do I accomplish this with any of the python drivers?
03-31-2020 11:12 AM
I'd love to switch database or connect to specific ones for specific queries or based on the current logged in user to apply multiple tenant that are actually separated. Couldn't find it in the driver docs so i hope Py2Neo has something planned. @technige do you know about this?
04-08-2020 08:03 PM
I have the same need. So far I haven't been able to connect to any other database, except the default. This is very frustating...
04-09-2020 05:30 AM
The 4.0 python drivers have not been release yet so you will only be able to connect to the default database.
If you want to connect to a different database, you can set that different database as the default in neo4j.conf and then restart the Neo4j instance.
Elaine
05-21-2020 08:24 AM
Thank you for the clarification Elaine! Had the same exact question over here. We'll switch the default database on an as needed basis. Hope this will be addressed in py2neo in the near future.
05-13-2020 02:13 AM
The latest py2neo v5 pre-release adds support for multiple databases. There are some details in the docs here:
05-21-2020 08:32 AM
Can confirm that technige's recommendation works. Adding 'name' in the graph database connector populates the specified graph and overrides the default setting.
from py2neo import Graph >>> sales = Graph("bolt+s://g.example.com:7687", name="target db")
03-25-2021 06:49 AM
awesome. you made my day
All the sessions of the conference are now available online