How kludex/uvicorn-worker works
Uvicorn Worker is a small Gunicorn worker-class package that runs ASGI applications using Uvicorn. The main workflow is Gunicorn starting the worker, which builds Uvicorn configuration and serves the application on Gunicorn-provided sockets; a separate subclass selects asyncio and h11 for PyPy-compatible setups. The worker also bridges logging and manages worker signals and notifications. Runtime behavior is shown in the sampled worker source; deployment and the h11 use case are documented in the README.
Main entry points: _workers.py Uvicorn worker
Components 6
Other components
- Gunicorn manager
- ASGI application
- Uvicorn worker
uvicorn_worker/_workers.py - H11 worker
uvicorn_worker/_workers.py - Uvicorn config
- Uvicorn server
Connections 5
- Gunicorn manager → Uvicorn worker: starts worker
README.md - ASGI application → Uvicorn worker: supplies app
README.md - Uvicorn worker → Uvicorn config: builds config
uvicorn_worker/_workers.py - Uvicorn worker → Uvicorn server: runs server
uvicorn_worker/_workers.py - H11 worker → Uvicorn worker: extends worker
uvicorn_worker/_workers.py