import hashlib


def calc_hash(value: str) -> str:
    """
    calculate the hash to be used for `after_catalog_created` and `before_pipeline_run`
    :param value: string value to calculate the hash for
    :return: hash string
    """
    return hashlib.sha1(value.encode("UTF-8")).hexdigest()[:8]