def Hasher(object):

    def __init__(self):
        self.md5 = hashlib.md5()

def get_hash(self, o):
    self.md5.update(o)
my_hash = self.md5.digest()
self.md5 = hashlib.md5()
How to reuse an instance of hashlib.md5