API Documentation¶
GraphDatabase¶
Driver Construction¶
The neo4j.Driver construction is done via a classmethod on the neo4j.GraphDatabase class.
- class neo4j.GraphDatabase¶
Accessor for
neo4j.Driverconstruction.- classmethod driver(uri, *, auth=None, **config)¶
Create a driver.
- Parameters:
uri (str) – the connection URI for the driver, see URI for available URIs.
auth (tuple[str, str] | Auth | None | AuthManager) – the authentication details, see Auth for available authentication details.
config – driver configuration key-word arguments, see Driver Configuration for available key-word arguments.
- Return type:
Driver creation example:
from neo4j import GraphDatabase uri = "neo4j://example.com:7687" driver = GraphDatabase.driver(uri, auth=("neo4j", "password")) driver.close() # close the driver object
For basic authentication,
authcan be a simple tuple, for example:auth = ("neo4j",