0

In the neomodel documentation it's possible to specify the neo4j connection string using the following statement:

from neomodel import config
config.DATABASE_URL = 'bolt://neo4j:neo4j@localhost:7687'

On neo4j 4.1, I am using multiple databases under the same server. I would like to specify the database I am using either in the connection string or somewhere else.

In py2neo I can do something like this:

graph = Graph(host='localhost', port=7687, auth=('neo4j','pwd'), name='dbname')

Is there any way to do this in neomodel?

nolio
  • 81
  • 6
  • neomodel is not updated for a long time, you need to use a different library/driver – Rajendra Kadam Jan 12 '21 at 16:19
  • I need the object graph mapper and meta classes functionality in order to integrate this with django. Unfortunately, py2neo doesn't provide the same functionality. I don't know any other library I can use. – nolio Jan 12 '21 at 16:52
  • For anyone coming to this check the NeoModel issue tracker - https://github.com/neo4j-contrib/neomodel/issues/541 where the op asked the same questions. This will allow for an easy reference for when this is supported outside of issuing a USE query to swap databases – Steve Mapes Aug 24 '21 at 12:08

0 Answers0