Skip to content

Utils

Utils

compute_page_path

compute_page_path(endpoint_name)

index -> '/', otherwise '/name-with-dashes'.

Source code in src/air/utils.py
16
17
18
def compute_page_path(endpoint_name: str) -> str:
    """index -> '/', otherwise '/name-with-dashes'."""
    return "/" if endpoint_name == "index" else f"/{endpoint_name.replace('_', '-')}"