Vue d'ensemble
Gunicorn 24.0, publié le 23 janvier 2025, introduit un worker ASGI expérimental permettant de servir des applications ASGI nativement.
Fonctionnalités principales
Worker ASGI beta
Le nouveau worker ASGI permet à Gunicorn de servir directement des applications FastAPI, Starlette ou autres frameworks ASGI sans passer par Uvicorn.
python
# Worker ASGI beta
# gunicorn --worker-class asgi --workers 4 app:app
# gunicorn.conf.py
bind = '0.0.0.0:8000'
workers = 4
worker_class = 'asgi' # nouveau worker beta
timeout = 120
