import hashlib


def get_md5(input_file, chunk_size=1024 * 16):
    """Get the md5 of a file without reading entire file in to memory."""
    m = hashlib.md5()
    while 1:
        chunk = input_file.read(chunk_size)
        if not chunk:
            break
        m.update(chunk)
    return m.hexdigest()