Overview
Uvicorn 0.18, released on June 23, 2022, adopts watchfiles as reload backend and removes the asgiref dependency.
Main Features
watchfiles backend
Auto-reload now uses watchfiles (Rust-based) instead of watchgod, offering significantly better performance.
python
# pip install uvicorn[standard]
# watchfiles is installed automatically
import uvicorn
uvicorn.run(
'app:app',
reload=True, # uses watchfiles
reload_delay=0.25,
)
Removed asgiref
The asgiref dependency has been removed, reducing the server footprint. Uvicorn handles the ASGI protocol directly.
python
# Minimal Uvicorn 0.18 dependencies
# pip install uvicorn
# -> click, h11 (no asgiref)
# pip install uvicorn[standard]
# -> adds httptools, watchfiles, websockets, etc.
