Skip to main content

run_command

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.
def run_command(
info: ScriptInfo,
host: str,
port: int,
reload: bool,
debugger: bool,
with_threads: bool,
cert: ssl.SSLContext | tuple[str, str | None] | t.Literal["adhoc"] | None,
extra_files: list[str] | None,
exclude_patterns: list[str] | 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.

Parameters

NameTypeDescription
infoScriptInfoAn object containing the application factory or instance and related configuration metadata.
hoststrThe network interface address to bind the server to.
portintThe network port to listen on for incoming requests.
reloadboolControls whether the server should automatically restart when Python files are modified.
debuggerboolControls whether the interactive Werkzeug debugger is enabled for unhandled exceptions.
with_threadsboolDetermines if the server should handle each request in a separate thread.
cert`ssl.SSLContexttuple[str, str
extra_files`list[str]None`
exclude_patterns`list[str]None`

Returns

TypeDescription
NoneThis function does not return a value; it starts a blocking server process.