Skip to content

evansd/whitenoise

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2d0c149 · Nov 3, 2022
Oct 25, 2022
Nov 3, 2022
Oct 23, 2022
Nov 3, 2022
Nov 3, 2022
Nov 3, 2022
Jan 28, 2022
Jan 28, 2022
Feb 7, 2022
Nov 3, 2022
May 9, 2022
Feb 4, 2022
Aug 8, 2013
Apr 27, 2022
Jun 10, 2022
Jul 8, 2022
Oct 11, 2022
Jun 5, 2022

Repository files navigation

WhiteNoise

https://img.shields.io/readthedocs/whitenoise?style=for-the-badge https://img.shields.io/github/workflow/status/evansd/whitenoise/CI/master?style=for-the-badge https://img.shields.io/badge/Coverage-96%25-success?style=for-the-badge https://img.shields.io/pypi/v/whitenoise.svg?style=for-the-badge https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge 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.

About

Radically simplified static file serving for Python web apps

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages