from typing import Callable from typing import NamedTuple from typing import Sequence from typing import Tuple from section7.router.error_handler import handle_error from section7.router.home import display_home class Routable(NamedTuple): """Structure for storing details for a given route :param route: String indicating the Flask URL rule to apply to the route entry :param entrypoint: The callable that Flask should invoke when the route is accessed :param methods: Sequence of HTTP method verbs that should be accepted by the route """ route: str entrypoint: Callable methods: Sequence[str] = ("GET",) ROUTES: Tuple[Routable, ...] = (Routable(route="/", entrypoint=display_home),)