Skip to content

Latest commit

 

History

History
37 lines (30 loc) · 1.45 KB

README_gdbdr.md

File metadata and controls

37 lines (30 loc) · 1.45 KB

How to Connect Neo4j in Python

  1. Install the Python package, neo4j
  2. Connect to the neo4j server from a Python script
  3. Three Arguments: GraphDatabase.driver(url, auth=(username, password))

1) Install the Python package, neo4j

pip install neo4j

2) Connect to the neo4j server from a Python script

from neo4j import GraphDatabase

gdbdr = GraphDatabase.driver('bolt://localhost:7687', auth=('neo4j', password))

Three Arguments: GraphDatabase.driver(url, auth=(username, password))

1. url: Hover the mouse over the tab to see it. NOT the url seen in the browser command-line.

2. username: Neo4j username seen with the neo4j command:

:server status

3. password: can be set in Neo4j using:

:server change-password

Use the URL seen when hovering over the tab

driver args

Do not use the URL seen in the command line

URL Yes NO

Copyright (C) 2018-present, DV Klopfenstein. All rights reserved.