Gunicorn

A fast, lightweight pre-fork WSGI and ASGI HTTP server for running Python web apps in production on UNIX.

Tool
PyPI
v26.2.0
10,707 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
85 /100 Excellent
Development Activity 76
Maintenance 72
Community 92
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
87 /100 Excellent
Architecture 90
Code Quality 86
Innovation 88
Learning Curve 85

Gunicorn (‘Green Unicorn’) is a Python WSGI and ASGI HTTP server for UNIX, built on a pre-fork worker model ported from Ruby’s Unicorn project. A master arbiter process supervises a pool of worker processes, restarting them when they die and reloading your application on signal, so a single command turns any WSGI or ASGI app into a resilient, production-ready service.

Broadly compatible with Django, Flask, Pyramid, FastAPI, Starlette, and any framework speaking the WSGI or ASGI protocol, Gunicorn is simply implemented, light on server resources, and fast. It ships several interchangeable worker types — synchronous, threaded, gevent, tornado, and ASGI — so you can match the concurrency model to your workload without changing application code.

What You Get

  • A single gunicorn command that boots and supervises a pool of worker processes for any WSGI or ASGI application.
  • Interchangeable worker types — sync, gthread, gevent, tornado, and asgi — selectable via --worker-class to fit your concurrency needs.
  • A master arbiter that keeps workers alive, restarts crashed processes, and supports zero-downtime reloads via SIGHUP and USR2.
  • Extensive configuration through CLI flags, a Python config file, or environment variables, with server hooks for lifecycle events.
  • Broad framework compatibility with Django, Flask, Pyramid, FastAPI, Starlette, and Paste-compatible deployments.

Common Use Cases

  • Serving a Django or Flask application in production behind an nginx reverse proxy.
  • Running FastAPI or Starlette ASGI apps with the dedicated ASGI worker class.
  • Scaling request handling across CPU cores by tuning the number of pre-forked workers.
  • Handling large numbers of concurrent, I/O-bound connections with gevent or threaded workers.

Under The Hood

Architecture Gunicorn implements a classic pre-fork model centered on the Arbiter class in gunicorn/arbiter.py, a master process that owns the listening sockets, spawns a configurable pool of workers, and keeps them alive by trapping UNIX signals — SIGHUP for reload, USR2 for binary upgrades, TTIN/TTOU to scale workers up and down. Your application is wrapped by a BaseApplication in gunicorn/app/base.py (with WSGIApplication as the CLI entry point), which loads your callable and hands it to workers; each worker in gunicorn/workers/ runs its own accept-and-serve loop, from the blocking SyncWorker in sync.py to threaded, gevent, tornado, and ASGI variants that subclass a shared base.

Tech Stack The project is pure Python (99% of the codebase), targets Python 3.10+, and is remarkably dependency-light — the only hard runtime requirement is packaging. Optional extras pull in gevent, tornado, or h2 for alternative worker classes and HTTP/2, and setproctitle for nicer process names. It builds with setuptools via pyproject.toml, exposes gunicorn and gunicornc console scripts, and integrates as a paste.server_runner entry point.

Code Quality The repository is mature and well-tested, with roughly 280 test modules under tests/ covering config parsing, HTTP handling, worker behavior, and the arbiter, driven by pytest and tox across multiple Python versions. A .pylintrc, structured config.py with a declarative KNOWN_SETTINGS registry, and clear module boundaries reflect a disciplined, long-maintained codebase. Every source file carries the MIT license header and the code favors explicit, readable control flow over cleverness.

API Design Developer experience is a core strength: a single gunicorn myapp:app command gets an app into production, and nearly every behavior is tunable through consistently named CLI flags, a Python config file, or environment variables. Settings are self-documenting via the config.py metadata, worker models swap in with a single --worker-class flag, and lifecycle hooks let operators inject custom logic, backed by a full documentation site at gunicorn.org and an examples/ directory of ready-to-run configurations.

Used by 33 apps in this directory

Python
71%
MIT

Langflow

AI Agents · AI Development

155,973

Build, test, and deploy AI agents and RAG workflows visually with native API and MCP server export.

View details
90
Repo Health
85
Technical
64
Dependency
Built with
Python 71%
TypeScript 21%
Updated 6 days ago
Python
55%
MIT

LibrePhotos

File Storage

8,111

Self-hosted photo library with AI-powered face recognition, semantic search, and automatic event albums — no cloud required.

View details
84
Repo Health
78
Technical
66
Dependency
Built with
Python 55%
TypeScript 43%
Updated 6 days ago
Python
84%
MIT

LiteLLM

AI Development · Developer Tools

61,933

Open source AI gateway and Python SDK that gives you one OpenAI-compatible interface to call 100+ LLM providers, with built-in routing, cost tracking, guardrails, and virtual keys.

View details
93
Repo Health
81
Technical
69
Dependency
Built with
Python 84%
TypeScript 11%
Updated 6 days ago
Svelte
32%
GPL 3.0

Mathesar

Databases

5,158

Spreadsheet-like interface for your PostgreSQL database — self-hosted, no SQL required, native Postgres access control.

View details
70
Repo Health
80
Technical
68
Dependency
Built with
Svelte 32%
TypeScript 27%
Python 21%
Updated 1 weeks ago
Python
45%
GPL 3.0

MaxKB

AI Development · Knowledge Management

23,022

Build enterprise-grade AI agents with RAG, workflows & multi-modal support

View details
92
Repo Health
68
Technical
66
Dependency
Built with
Python 45%
Vue 37%
TypeScript 17%
Updated 1 weeks ago
Python
58%
Apache 2.0

MLflow

AI Development · Monitoring

28,512

The open source AI engineering platform for debugging, evaluating, monitoring, and optimizing production LLMs and agents at scale.

View details
96
Repo Health
86
Technical
67
Dependency
Built with
Python 58%
TypeScript 35%
Updated 6 days ago
TypeScript
54%
Other

OpenReplay

Analytics

13,042

Self-hosted session replay and product analytics suite that lets you see exactly what users do on your web app — without sending data to third parties.

View details
91
Repo Health
77
Technical
66
Dependency
Built with
TypeScript 54%
Go 13%
Updated 1 weeks ago
Go
71%
Apache 2.0

OSV.dev

Security

3,001

Google's open-source vulnerability database that maps CVEs to exact package versions across 50+ ecosystems with a public API and data dumps.

View details
87
Repo Health
82
Technical
66
Dependency
Built with
Go 71%
Python 19%
Updated 1 weeks ago
TypeScript
50%
Other

Phase Console

Devops · Security

931

End-to-end encrypted secrets management for engineering teams — from local dev to Kubernetes production.

View details
85
Repo Health
73
Technical
63
Dependency
Built with
TypeScript 50%
Python 48%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers