Question for plugin developers:
One problem I imagine that you face when implementing some of your ideas is "where do I store persistent data?" For example, I could imagine a plugin that stores book/device information for later processing. Other plugins might want the equivalent of private custom columns.
My thought is that it wouldn't be terribly difficult to implement an attribute scheme. Such a scheme would permit you to associate a named object with a book. The stored attributes (class attributes) must be types known to python so they could be JSON-serializable, probably limited to unicode/string, boolean, int/float, and datetime, as well as lists and dicts of these types. Interfaces would be provided to attach the object to a book and to retrieve an object (if any). They would be something like
db.set_associated_object(id, 'name', class_instance)
and
db.get_associated_object(id, 'name')
The question: if you had this, what would you use it for, if anything?
|