Skip to main content

run_command

Run a local development server.

def run_command(
info: ScriptInfo,
host: str = 127.0.0.1,
port: int = 5000,
reload: bool = None,
debugger: bool = None,
with_threads: bool = True,
cert: ssl.SSLContext | tuple[str, str | None] | t.Literal["adhoc"] | None,
extra_files: list[str] | None = None,
exclude_patterns: list[str] | None = None
) - > None

Run a local development server. This server is for development purposes only. It does not provide the stability, security, or performance of production WSGI servers. The reloader and debugger are enabled by default with the '--debug' option.

Parameters

NameTypeDescription
infoScriptInfoThe script information object containing details about the application.
hoststr = 127.0.0.1The interface to bind the development server to.
portint = 5000The port to bind the development server to.
reloadbool = NoneEnable or disable the reloader. By default, the reloader is active if debug is enabled.
debuggerbool = NoneEnable or disable the debugger. By default, the debugger is active if debug is enabled.
with_threadsbool = TrueEnable or disable multithreading for the development server.
cert`ssl.SSLContexttuple[str, str
extra_files`list[str]None` = None
exclude_patterns`list[str]None` = None

Returns

TypeDescription
None