Scroll to navigation

RUNNING(1) User Commands RUNNING(1)

NAME

Running - ASGI server implementation, using uvloop and httptools

SYNOPSIS

uvicorn [OPTIONS] APP

OPTIONS

Bind socket to this host. [default: 127.0.0.1]
Bind socket to this port. If 0, an available port will be picked. [default: 8000]
Bind to a UNIX domain socket.
Bind to socket from this file descriptor.
Enable auto-reload.
Set reload directories explicitly, instead of using the current working directory.
Set glob patterns to include while watching for files. Includes '*.py' by default; these defaults can be overridden with `--reloadexclude`. This option has no effect unless watchfiles is installed.
Set glob patterns to exclude while watching for files. Includes '.*, .py[cod], .sw.*, ~*' by default; these defaults can be overridden with `--reload-include`. This option has no effect unless watchfiles is installed.
Delay between previous and next check if application needs to be. Defaults to 0.25s. [default: 0.25]
Number of worker processes. Defaults to the $WEB_CONCURRENCY environment variable if available, or 1. Not valid with --reload.
Event loop implementation. [default: auto]
HTTP protocol implementation. [default: auto]
WebSocket protocol implementation. [default: auto]
WebSocket max size message in bytes [default: 16777216]
The maximum length of the WebSocket message queue. [default: 32]
WebSocket ping interval in seconds. [default: 20.0]
WebSocket ping timeout in seconds. [default: 20.0]
WebSocket per-message-deflate compression [default: True]
Lifespan implementation. [default: auto]
Select ASGI3, ASGI2, or WSGI as the application interface. [default: auto]
Environment configuration file.
Logging configuration file. Supported formats: .ini, .json, .yaml.
Log level. [default: info]
Enable/Disable access log.
Enable/Disable colorized logging.
Enable/Disable X-Forwarded-Proto, X-Forwarded-For, X-Forwarded-Port to populate remote address info.
Enable/Disable default Server header.
Enable/Disable default Date header.
Comma separated list of IPs to trust with proxy headers. Defaults to the $FORWARDED_ALLOW_IPS environment variable if available, or '127.0.0.1'.
Set the ASGI 'root_path' for applications submounted below a given URL path.
Maximum number of concurrent connections or tasks to allow, before issuing HTTP 503 responses.
Maximum number of connections to hold in backlog
Maximum number of requests to service before terminating the process.
Close Keep-Alive connections if no new data is received within this timeout. [default: 5]
Maximum number of seconds to wait for graceful shutdown.
SSL key file
SSL certificate file
SSL keyfile password
SSL version to use (see stdlib ssl module's) [default: 17]
Whether client certificate is required (see stdlib ssl module's) [default: 0]
CA certificates file
Ciphers to use (see stdlib ssl module's) [default: TLSv1]
Specify custom default HTTP response headers as a Name:Value pair
Display the uvicorn version and exit.
Look for APP in the specified directory, by adding this to the PYTHONPATH. Defaults to the current working directory.
For h11, the maximum number of bytes to buffer of an incomplete event.
Treat APP as an application factory, i.e. a () -> <ASGI app> callable.
Show this message and exit.

SEE ALSO

The full documentation for Running is maintained as a Texinfo manual. If the info and Running programs are properly installed at your site, the command

info Running

should give you access to the complete manual.

March 2024 Running uvicorn 0.29.0 with CPython 3.11.8 on Linux