Popular recipes by cathy park http://code.activestate.com/recipes/users/4181365/2012-03-20T01:08:15-07:00ActiveState Code RecipesManage hashes in database files. (Python)
2012-03-20T01:08:15-07:00cathy parkhttp://code.activestate.com/recipes/users/4181365/http://code.activestate.com/recipes/578083-manage-hashes-in-database-files/
<p style="color: grey">
Python
recipe 578083
by <a href="/recipes/users/4181365/">cathy park</a>
(<a href="/recipes/tags/caching/">caching</a>, <a href="/recipes/tags/hashes/">hashes</a>).
</p>
<p>This module can be used to calculate file hashes, store them in a database file
and retrieve them at a later date.</p>
<p>It uses the files modify time stamp to know if it can use the hash stored in
the db or if it has to re-calculate it. So the user will not have to worry
about the hash being incorrect if the file changes in between runs.</p>