Skip to main content

routes_command

Show all registered routes with endpoints and methods.

def routes_command(
sort: str,
all_methods: bool
) - > None

Show all registered routes with endpoints and methods.

Parameters​

NameTypeDescription
sortstrThe method to sort routes by. Valid options are 'endpoint', 'methods', 'domain', 'rule', or 'match'. 'match' sorts routes by the order Flask will use to match them when dispatching a request.
all_methodsboolA flag indicating whether to show HEAD and OPTIONS methods in the output. If false, these methods are excluded.

Returns​

TypeDescription
NoneThis function does not return any value; it prints the routes to the console.