I have a project I'm working on (http://github.com/lusis/vogeler). One of the goals is to provide support with backup and messaging capabilities. I think I have a workable model, but I wanted to get the best practices from the Python crowd. Here you can see the new implementation:
http://github.com/lusis/vogeler/blob/master/vogeler/db/generic.py
couch2.py is my subclass of general.
Essentially, a common class provides a common set of interfaces (createdb, usedb, create, update) that invoke private methods such as _create_db, _use_db, etc.
I expect database-specific stuff to be subclassed by GenericPersistence and override private methods. Is this considered a bad form? Overriding private methods in general seems strange, but the end result is that it works. I just want to make sure I'm not breaking some unwritten subclass contract in Python.
lusis source
share