import hashlib


def get_sha1(file_obj, block_size=65536):
    """Get SHA1 for a file"""
    sha = hashlib.sha1()
    with open(file_obj, 'rb') as f:
        while True:
            buf = f.read(block_size)
            if not buf:
                break
            sha.update(buf)
    return sha.hexdigest()