def _get_checksum(path):

    # md5 uses a 512-bit digest blocks, let's scale by defined block_size
    _md5 = hashlib.md5()
    chunk_size = 128 * _md5.block_size

    try:
        with open(path, 'rb') as _file:
            for chunk in iter(lambda: _file.read(chunk_size), ''):
                _md5.update(chunk)
        return _md5.hexdigest()

    except IOError:
        return None
Generates a md5 checksum of the file at the specified path.
dataset/ETHPy150Open xtrementl/focus/focus/plugin/modules/apps.py/_get_checksum