A lightweight ASGI web server implementation for Python, supporting HTTP/1.1 and WebSockets.
Uvicorn is an ASGI web server implementation for Python that provides a minimal low-level interface for async frameworks. It solves Python's historical lack of a standard server/application interface for asynchronous web applications by implementing the ASGI specification, supporting both HTTP/1.1 and WebSocket protocols.
Python developers building asynchronous web applications with frameworks like FastAPI, Starlette, or Django Channels who need a lightweight, high-performance ASGI-compatible server.
Developers choose Uvicorn for its minimal design, excellent performance with optional Cython-based optimizations, and framework-agnostic approach that works with any ASGI-compatible application while supporting modern web protocols.
An ASGI web server, for Python. 🦄
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
With the 'standard' installation, Uvicorn leverages Cython-based dependencies like uvloop and httptools for faster event loops and protocol handling, making it one of the fastest ASGI servers available.
Includes hot reload capability using watchfiles for automatic restarts on code changes, along with colored logs and environment file support, speeding up iteration during development.
Follows the ASGI specification, allowing it to work seamlessly with any ASGI-compatible framework such as FastAPI, Starlette, or Django Channels, decoupling server implementation from application logic.
The base installation uses pure Python dependencies, keeping it lightweight and easy to deploy, while optional extras allow for enhanced performance and features without bloat.
Unlike alternatives like Hypercorn, Uvicorn does not support HTTP/2 natively, which can be a limitation for projects needing modern protocol features without additional setup.
For full performance and WebSocket support, users must install the 'standard' package, adding complexity and potential installation issues compared to all-in-one solutions.
Primarily focused on asyncio, it lacks built-in support for other async frameworks like trio, whereas servers like Hypercorn offer more runtime options.