mongokit
mongokit copied to clipboard
Function to determine differences between Object's current and persistant state eg. obj.dirty()
Returns a list of fields (and values) that differ from the object's current and persistant states. One could create a type of version or modification history. Apologies in advance if there is already a method to do this in mongokit (I haven't found one and will build my own)
+1
There isn't a public method to do it. However, there is a (very) old (and unofficial) implementation of versioned document here: https://github.com/namlook/mongokit/blob/master/mongokit/versioned_document.py
You can check it out.
If you want the obj.dirty() method, you are very welcome to submit a pull request (with tests and documentation) :)