def file_md5(file_path):
    """Returns a string Hex md5 digest for the file at ``file_path``."""
    log.debug("Calculating md5 for %s", file_path)
    start_ms = time.time() * 10**3
    fp = open(file_path, 'rb')
    try:
        # returns tuple (md5_hex, md5_base64, size)
        md5, _, _ = boto.utils.compute_md5(fp)
    finally:
        fp.close()
    duration_ms = (time.time() * 10**3) - start_ms
    log.debug("Calculated hash %s for %s in %s ms", md5, file_path, 
        duration_ms)
    return md5
dataset/ETHPy150Open amorton/cassback/cassback/file_util.py/file_md5/original