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 metadata used to load the WSGI application.
hoststrThe network interface address the development server should bind to.
portintThe network port the development server should listen on.
reloadboolWhether to enable the auto-reloader which restarts the server when code changes are detected.
debuggerboolWhether to enable the interactive Werkzeug debugger for unhandled exceptions.
with_threadsboolWhether to handle concurrent requests using multiple threads.
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 development server process.