Hi,
I am trying to create a class in Python which will inherit from
neo4j.GraphDatabase. The reason why i am doing so is i want to do some
validations when adding a node to the graph and also add several utility
methods for graph traversals. However the inheritance class does not seem to
work. I am not able to call the subclass's methods.
import neo4j
class Test(neo4j.GraphDatabase):
dummy = 1
n = Test("testdb")
print(n.__class__) # returns <class 'neo4j._core.GraphDatabase'>
Am i doing something wrong here?
For now, I am delegating all calls to a embedded GraphDatabase object in my
class. But this makes the code verbose.
Please suggest.
Thanks,
Subhajit
_______________________________________________
Neo mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user