Pyjoyment.Command.cgi - CGI command

Usage: APPLICATION cgi [OPTIONS]

  ./myapp.py cgi

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"
      --nph                 Enable non-parsed-header mode

Pyjoyment.Command.cgi starts applications with the Pyjo.Server.CGI backend.

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::cgi of Mojolicious 9.49.

Classes

class Pyjoyment.Command.cgi.Pyjoyment_Command_cgi(**kwargs: Any)[source]

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

description = 'Start application with CGI'
description = cgi.description
cgi.description = 'Foo'

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

run(*args: str) → Any[source]
cgi.run(*sys.argv[1:])

Run this command.

usage = 'Usage: APPLICATION cgi [OPTIONS]\n\n  ./myapp.py cgi\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      --nph                 Enable non-parsed-header mode\n'
usage = cgi.usage
cgi.usage = 'Foo'

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