from pathlib import Path


def file_extension(path: str) -> str:
    """
    Extracts canonical file extension from path (no leading dot and all lowercase)
    e.g. mp4, avi, jpeg, ts
    """
    return Path(path).suffix[1:].lower()