Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-25-2020 02:02 AM
Hi All,
I am connecting to Neo4j Database in Python script like below:
from py2neo import Graph
graph = Graph(uri,auth=(user,password))
graph.run() or graph.evaluate() running for CREATE/MERGE statements.
There is no close() method with Graph().
GraphDatabase.driver is not feasible because needs to change a lot inside the script.
Please let me know how to close the connection from the connection pool at the end of the Python script for graph = Graph() Neo4j connection. Thanks.
12-26-2020 04:21 AM
Hi @naikum, I have been using py2neo around 10 months or so. As far as I know there is no close() method.
my 2 cents
In the Graph context you can use a timeout, if you know the time length of your transactions.
-> auto
( readonly=False , after=None , metadata=None , timeout=None
-> begin
( autocommit=False , readonly=False , after=None , metadata=None , timeout=None )
I am now trying to migrate from py2neo to Neo4j Python Driver, for few reasons -
Hope this helps.....
All the sessions of the conference are now available online