Python / Uvicorn Fundamentals Interview Questions
How do you install Uvicorn and what is the difference between the minimal and standard installations?
Uvicorn is available on PyPI and can be installed with pip. There are two installation variants targeting different use cases.
| Variant | Command | What it includes |
|---|---|---|
| Minimal (pure Python) | pip install uvicorn | h11 HTTP parser, asyncio event loop only - no Cython deps |
| Standard (recommended) | pip install uvicorn[standard] | Adds uvloop, httptools, websockets, watchfiles for auto-reload |
# Minimal install - pure Python, good for restricted environments pip install uvicorn # Standard install - Cython-based performance extras pip install "uvicorn[standard]" # Pin a specific version for reproducible deployments pip install "uvicorn[standard]==0.30.1" # Verify installation uvicorn --version # Install in a virtual environment (recommended) python -m venv .venv source .venv/bin/activate # Linux/macOS .venv\Scripts\activate # Windows pip install "uvicorn[standard]"
What the standard extras add:
- uvloop - a Cython-based replacement for asyncio's event loop, providing a significant throughput boost
- httptools - a fast Cython-based HTTP parser (replaces the pure-Python h11)
- websockets - the default WebSocket protocol library
- watchfiles - enables the
--reloadfile-watching feature for development
More Related questions...