Pyjoyment.Command.routes - Routes command

Usage: APPLICATION routes [OPTIONS]

  ./myapp.py routes
  ./myapp.py routes -v

Options:
  -h, --help                Show this summary of available options
      --home <path>         Path to home directory of your application,
                            defaults to the value of PYJO_HOME or
                            auto-detection
      --log-format <name>   Format of log messages, "text" or "json",
                            defaults to the value of PYJO_LOG_FORMAT or
                            "text"
  -m, --mode <name>         Operating mode for your application, defaults to
                            the value of PYJO_MODE or "development"
  -v, --verbose             Print additional details about routes, flags
                            indicate C=Conditions, P=Partial, U=Under and
                            W=WebSocket

Pyjoyment.Command.routes lists all your application routes.

This is a core command, that means it is always enabled and its code a good example for learning to build new commands, you’re welcome to fork it.

See Pyjoyment.Commands for a list of commands that are available by default.

See also

Pyjoyment, https://mojolicious.org.

Ported from Mojolicious::Command::routes of Mojolicious 9.49.

Classes

class Pyjoyment.Command.routes.Pyjoyment_Command_routes(**kwargs: Any)[source]

Pyjoyment.Command.routes inherits all attributes and methods from Pyjoyment.Command and implements the following new ones.

description = 'Show available routes'
description = routes.description
routes.description = 'Foo'

Short description of this command, used for the command list.

run(*args: str) → None[source]
routes.run(*sys.argv[1:])

Run this command.

usage = 'Usage: APPLICATION routes [OPTIONS]\n\n  ./myapp.py routes\n  ./myapp.py routes -v\n\nOptions:\n  -h, --help                Show this summary of available options\n      --home <path>         Path to home directory of your application,\n                            defaults to the value of PYJO_HOME or\n                            auto-detection\n      --log-format <name>   Format of log messages, "text" or "json",\n                            defaults to the value of PYJO_LOG_FORMAT or\n                            "text"\n  -m, --mode <name>         Operating mode for your application, defaults to\n                            the value of PYJO_MODE or "development"\n  -v, --verbose             Print additional details about routes, flags\n                            indicate C=Conditions, P=Partial, U=Under and\n                            W=WebSocket\n'
usage = routes.usage
routes.usage = 'Foo'

Usage information for this command, used for the help screen.