Gunicorn 'Green Unicorn' is a Python WSGI HTTP Server for UNIX. It's a pre-fork worker model ported from Ruby's Unicorn project. The Gunicorn server is broadly compatible with various web frameworks, simply implemented, light on server resource usage, and fairly speedy.
New in v24: Native ASGI support (beta) for async frameworks like FastAPI!
pip install gunicorn
gunicorn myapp:app --workers 4For ASGI applications (FastAPI, Starlette):
gunicorn myapp:app --worker-class asgi- WSGI support for Django, Flask, Pyramid, and any WSGI framework
- ASGI support (beta) for FastAPI, Starlette, Quart
- uWSGI binary protocol for nginx integration
- Multiple worker types: sync, gthread, gevent, eventlet, asgi
- Graceful worker process management
- Compatible with Python 3.12+
Full documentation at https://gunicorn.org
- Report bugs on GitHub Issues
- Chat in #gunicorn on Libera.chat
- See CONTRIBUTING.md for contribution guidelines
Gunicorn is maintained thanks to our sponsors. Become a sponsor.
Gunicorn is released under the MIT License. See the LICENSE file for details.