import hashlib
from pathlib import Path


def get_md5(path: Path):
    """
    Get the MD5 value of a path.
    """

    with path.open("rb") as fin:
        data = fin.read()
    return hashlib.md5(data).hexdigest()