from typing import Iterable
from typing import Pattern
import re


def watcha_patterns(path_regex: str) -> Iterable[Pattern]:
    """Returns the list of patterns for a watcha endpoint

    Args:
        path_regex: The regex string to match. This should NOT have a ^
            as this will be prefixed.

    Returns:
        A list of regex patterns.
    """
    watcha_prefix = "^/_watcha"
    patterns = [re.compile(watcha_prefix + path_regex)]
    return patterns