diff --git a/docs/source/api.rst b/docs/source/api.rst index 2198a8128..a623387c1 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -895,7 +895,7 @@ To construct a :class:`neo4j.Session` use the :meth:`neo4j.Driver.session` metho from neo4j import GraphDatabase - with GraphDatabase(uri, auth=(user, password)) as driver: + with GraphDatabase.driver(uri, auth=(user, password)) as driver: session = driver.session() try: result = session.run("MATCH (a:Person) RETURN a.name AS name") diff --git a/docs/source/async_api.rst b/docs/source/async_api.rst index 3b4bc2551..483b70e74 100644 --- a/docs/source/async_api.rst +++ b/docs/source/async_api.rst @@ -556,7 +556,7 @@ To construct a :class:`neo4j.AsyncSession` use the :meth:`neo4j.AsyncDriver.sess async def main(): - async with AsyncGraphDatabase(uri, auth=(user, password)) as driver: + async with AsyncGraphDatabase.driver(uri, auth=(user, password)) as driver: session = driver.session() try: result = await session.run("MATCH (a:Person) RETURN a.name AS name") diff --git a/docs/source/breaking_changes.rst b/docs/source/breaking_changes.rst index d151478a6..7ed913dcc 100644 --- a/docs/source/breaking_changes.rst +++ b/docs/source/breaking_changes.rst @@ -44,7 +44,11 @@ The driver configuration argument :code:`encrypted` is by default set to :code:` from neo4j import GraphDatabase - driver = GraphDatabase("bolt://localhost:7687", auth=("neo4j", "password"), encrypted=True) + driver = GraphDatabase.driver( + "bolt://localhost:7687", + auth=("neo4j", "password"), + encrypted=True, + ) driver.close()