If you're looking for a programmatic equivalent of the uvicorn command line interface, use n(): There are several ways to run uvicorn directly from your application. įor more information, see the settings documentation. factory Treat APP as an application factory, i. h11 - max - incomplete - event - size INTEGER For h11, the maximum number of bytes to buffer of an incomplete event. Defaults to the current working directory. app - dir TEXT Look for APP in the specified directory, by adding this to the PYTHONPATH. ssl - keyfile TEXT SSL key file - ssl - certfile TEXT SSL certificate file - ssl - keyfile - password TEXT SSL keyfile password - ssl - version INTEGER SSL version to use ( see stdlib ssl module 's) - ssl - cert - reqs INTEGER Whether client certificate is required ( see stdlib ssl module 's) - ssl - ca - certs TEXT CA certificates file - ssl - ciphers TEXT Ciphers to use ( see stdlib ssl module 's) - header TEXT Specify custom default HTTP response headers as a Name : Value pair - version Display the uvicorn version and exit. timeout - graceful - shutdown INTEGER Maximum number of seconds to wait for graceful shutdown. timeout - keep - alive INTEGER Close Keep - Alive connections if no new data is received within this timeout. backlog INTEGER Maximum number of connections to hold in backlog - limit - max - requests INTEGER Maximum number of requests to service before terminating the process. limit - concurrency INTEGER Maximum number of concurrent connections or tasks to allow, before issuing HTTP 503 responses. root - path TEXT Set the ASGI 'root_path' for applications submounted below a given URL path. Defaults to the $ FORWARDED_ALLOW_IPS environment variable if available, or '127.0.0.1'. forwarded - allow - ips TEXT Comma separated list of IPs to trust with proxy headers. date - header / - no - date - header Enable / Disable default Date header. server - header / - no - server - header Enable / Disable default Server header. proxy - headers / - no - proxy - headers Enable / Disable X - Forwarded - Proto, X - Forwarded - For, X - Forwarded - Port to populate remote address info. use - colors / - no - use - colors Enable / Disable colorized logging. access - log / - no - access - log Enable / Disable access log. log - config PATH Logging configuration file. env - file PATH Environment configuration file. interface Select ASGI3, ASGI2, or WSGI as the application interface. ws - max - size INTEGER WebSocket max size message in bytes - ws - ping - interval FLOAT WebSocket ping interval - ws - ping - timeout FLOAT WebSocket ping timeout - ws - per - message - deflate BOOLEAN WebSocket per - message - deflate compression - lifespan Lifespan implementation. ![]() Defaults to the $ WEB_CONCURRENCY environment variable if available, or 1. workers INTEGER Number of worker processes. reload - delay FLOAT Delay between previous and next check if application needs to be. This option has no effect unless watchfiles is installed. sw.*, ~* ' by default these defaults can be overridden with ` - reload - include `. reload - exclude TEXT Set glob patterns to exclude while watching for files. Includes '*.py' by default these defaults can be overridden with ` - reload - exclude `. reload - include TEXT Set glob patterns to include while watching for files. reload - dir PATH Set reload directories explicitly, instead of using the current working directory. fd INTEGER Bind to socket from this file descriptor. $ uvicorn - help Usage : uvicorn APP Options : - host TEXT Bind socket to this host.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |