evansd/whitenoise

Radically simplified static file serving for Python web apps

Python

2,762

940 commits

updated Oct 4, 2026

See the code

README

==========
WhiteNoise
==========

.. image:: https://img.shields.io/readthedocs/whitenoise?style=for-the-badge
   :target: https://whitenoise.readthedocs.io/en/latest/

.. image:: https://img.shields.io/github/actions/workflow/status/evansd/whitenoise/main.yml.svg?branch=master&style=for-the-badge
   :target: https://github.com/evansd/whitenoise/actions?workflow=CI

.. image:: https://img.shields.io/badge/Coverage-96%25-success?style=for-the-badge
   :target: https://github.com/evansd/whitenoise/actions?workflow=CI

.. image:: https://img.shields.io/pypi/v/whitenoise.svg?style=for-the-badge
   :target: https://pypi.org/project/whitenoise/

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge
   :target: https://github.com/psf/black

.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=for-the-badge
   :target: https://github.com/pre-commit/pre-commit
   :alt: pre-commit

**Radically simplified static file serving for Python web apps**

With a couple of lines of config WhiteNoise allows your web app to serve its
own static files, making it a self-contained unit that can be deployed anywhere
without relying on nginx, Amazon S3 or any other external service. (Especially
useful on Heroku, OpenShift and other PaaS providers.)

It's designed to work nicely with a CDN for high-traffic sites so you don't have to
sacrifice performance to benefit from simplicity.

WhiteNoise works with any WSGI-compatible app but has some special auto-configuration
features for Django.

WhiteNoise takes care of best-practices for you, for instance:

* Serving compressed content (gzip and Brotli formats, handling Accept-Encoding
  and Vary headers correctly)
* Setting far-future cache headers on content which won't change

Worried that serving static files with Python is horribly inefficient?
Still think you should be using Amazon S3? Have a look at the `Infrequently
Asked Questions`_.

To get started, see the documentation_.

.. _Infrequently Asked Questions: https://whitenoise.readthedocs.io/en/stable/#infrequently-asked-questions
.. _documentation: https://whitenoise.readthedocs.io/en/stable/

Not written in Markdown, so it's shown here as plain text — view it formatted on GitHub.

django

evansd/whitenoise

Radically simplified static file serving for Python web apps

Python

2,762

940 commits

updated Oct 4, 2026

See the code

README

==========
WhiteNoise
==========

.. image:: https://img.shields.io/readthedocs/whitenoise?style=for-the-badge
   :target: https://whitenoise.readthedocs.io/en/latest/

.. image:: https://img.shields.io/github/actions/workflow/status/evansd/whitenoise/main.yml.svg?branch=master&style=for-the-badge
   :target: https://github.com/evansd/whitenoise/actions?workflow=CI

.. image:: https://img.shields.io/badge/Coverage-96%25-success?style=for-the-badge
   :target: https://github.com/evansd/whitenoise/actions?workflow=CI

.. image:: https://img.shields.io/pypi/v/whitenoise.svg?style=for-the-badge
   :target: https://pypi.org/project/whitenoise/

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge
   :target: https://github.com/psf/black

.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=for-the-badge
   :target: https://github.com/pre-commit/pre-commit
   :alt: pre-commit

**Radically simplified static file serving for Python web apps**

With a couple of lines of config WhiteNoise allows your web app to serve its
own static files, making it a self-contained unit that can be deployed anywhere
without relying on nginx, Amazon S3 or any other external service. (Especially
useful on Heroku, OpenShift and other PaaS providers.)

It's designed to work nicely with a CDN for high-traffic sites so you don't have to
sacrifice performance to benefit from simplicity.

WhiteNoise works with any WSGI-compatible app but has some special auto-configuration
features for Django.

WhiteNoise takes care of best-practices for you, for instance:

* Serving compressed content (gzip and Brotli formats, handling Accept-Encoding
  and Vary headers correctly)
* Setting far-future cache headers on content which won't change

Worried that serving static files with Python is horribly inefficient?
Still think you should be using Amazon S3? Have a look at the `Infrequently
Asked Questions`_.

To get started, see the documentation_.

.. _Infrequently Asked Questions: https://whitenoise.readthedocs.io/en/stable/#infrequently-asked-questions
.. _documentation: https://whitenoise.readthedocs.io/en/stable/

Not written in Markdown, so it's shown here as plain text — view it formatted on GitHub.

django

Project health

Overall

5.2/10

Maintained

8/10

Code review

0/10
OpenSSF Scorecard

Latest release

6.12.0 · Feb 27, 2026

Releases this year

1

Significant stargazers

(top 24 of 29)

Daniel Hahler

575 followers · starred Jun 2021

Jannis Leidel

2,702 followers · starred Mar 2014

Kim Christie

4,002 followers · starred Apr 2016

Chris Jerdonek

268 followers · starred Dec 2014