11/6/2023 0 Comments Installing anaconda on mac m1This doesn’t allow for long-lived connections, like you get with long-poll HTTP or WebSocket connections, WSGI applications are a single, synchronous callable that takes a request and returns a response. Most well established Python Web frameworks started out as WSGI-based frameworks. Import asyncio async def app ( scope, receive, send ): """ Send a slowly streaming HTTP response back to the client. 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. aįor more information, see the settings documentation. factory Treat APP as an application factory, i.e. app-dir TEXT Look for APP in the specified directory, byĪdding this to the PYTHONPATH. version Display the uvicorn version and exit. header TEXT Specify custom default HTTP response headers ssl-ciphers TEXT Ciphers to use (see stdlib ssl module's) ssl-cert-reqs INTEGER Whether client certificate is required (see ssl-version INTEGER SSL version to use (see stdlib ssl module's) ssl-keyfile-password TEXT SSL keyfile password timeout-keep-alive INTEGER Close Keep-Alive connections if no new data limit-max-requests INTEGER Maximum number of requests to service before backlog INTEGER Maximum number of connections to hold in limit-concurrency INTEGER Maximum number of concurrent connections or root-path TEXT Set the ASGI 'root_path' for applications $FORWARDED_ALLOW_IPS environment variable if forwarded-allow-ips TEXT Comma separated list of IPs to trust with 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. WebSocket per-message-deflate compression ws-ping-timeout FLOAT WebSocket ping timeout ws-ping-interval FLOAT WebSocket ping interval ws-max-queue INTEGER The maximum length of the WebSocket message ws-max-size INTEGER WebSocket max size message in bytes workers INTEGER Number of worker processes. reload-delay FLOAT Delay between previous and next check ifĪpplication needs to be. Option has no effect unless watchfiles is reload-exclude TEXT Set glob patterns to exclude while watchingįor files. Includes '*.py' by default theseĭefaults can be overridden with `-reload-Įxclude`. reload-include TEXT Set glob patterns to include while watchingįor files. reload-dir PATH Set reload directories explicitly, instead fd INTEGER Bind to socket from this file descriptor.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |