from typing import Annotated from fastapi import Path PGroup = Annotated[str, Path(pattern=r"^p\d{5}$")]