Good interface for reverting effect of function
def revert(func):
    @wraps(func._revert)
    def wrapper(*args,**kwargs):
        return func._revert(*args,**kwargs)
    return wrapper

You are returning a wrapper, which takes arguments, calls a function, and returns results...
I'm pretty sure that is just a long way of writing:
def revert(func):
    return func._revert

This begs the question: why store the revert function as func._revert, when you could store it as func.revert?  Then instead of:
revert(do_stuff)('something')

you could write:
do_stuff.revert('something')

which is one character shorter.  Even better: autocomplete can tell you whether there is a .revert member for do_stuff, which is not possible using revert(...).