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
55%
Other

PostHog

Ab Testing Experimentation · Analytics · Developer Tools

40,397

The all-in-one open source product platform combining analytics, session replay, feature flags, error tracking, AI observability, and a built-in data warehouse in a single self-hostable stack.

View details
92
Repo Health
80
Technical
65
Dependency
Built with
Python 55%
TypeScript 36%
Updated 6 days ago
JavaScript
50%
AGPL 3.0

QRev

AI Agents · CRM

364

Open source AI-first sales platform that replaces Salesforce with autonomous agents handling prospecting, outreach, and lead management at scale.

View details
39
Repo Health
68
Technical
64
Dependency
Built with
JavaScript 50%
Python 28%
TypeScript 14%
Updated 8 months ago
Python
45%
Other

Redash

Analytics · Data Engineering

28,849

Redash lets anyone connect to 35+ SQL and NoSQL data sources, write a query in the browser, and turn the result into a shared dashboard — no separate BI suite required.

View details
91
Repo Health
74
Technical
61
Dependency
Built with
Python 45%
JavaScript 29%
TypeScript 19%
Updated 1 weeks ago
Python
59%
AGPL 3.0

Speakr

AI Assistants

4,112

Self-hosted AI transcription with speaker diarization, smart tagging, and multi-user collaboration — your recordings stay on your infrastructure.

View details
84
Repo Health
79
Technical
70
Dependency
Built with
Python 59%
HTML 21%
JavaScript 17%
Updated 1 weeks ago
Python
97%
MPL 2.0

Taiga Back

Developer Tools · Project Management

859

Self-hosted agile project management backend with Scrum, Kanban, issue tracking, and a full REST API — built on Django and PostgreSQL.

View details
72
Repo Health
74
Technical
64
Dependency
Built with
Python 97%
Updated 1 months ago
Rust
66%
Apache 2.0

Temps

Analytics · Devops · Monitoring

865

A self-hosted Rust PaaS that replaces Vercel, Sentry, PostHog, Pingdom, Resend, and E2B with one binary — plus 440+ CLI operations agents like Claude Code can drive directly.

View details
81
Repo Health
86
Technical
66
Dependency
Built with
Rust 66%
TypeScript 33%
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