--- id: whitenoise version: "6.12.0" license: MIT license_treatment: permissive maintenance: active --- # whitenoise — Radically simplified static file serving for WSGI applications License: permissive · Maintenance: active · Downloads: 16.7M/mo ## What it is and what it does WhiteNoise is a WSGI middleware that allows Python web applications to serve their own static files without relying on external services like nginx or Amazon S3. It wraps any WSGI-compatible application and intercepts requests for static assets, handling them efficiently within the application itself. This makes deployments simpler and more self-contained, particularly valuable on Platform-as-a-Service providers where external services may be unavailable or costly. The package automates several static-file best practices: it compresses responses using gzip and Brotli formats with proper Accept-Encoding and Vary header handling, sets far-future cache headers on immutable content, and includes special auto-configuration for Django applications. It is designed to work alongside CDNs for high-traffic sites, so adopting it does not sacrifice performance for simplicity. Use it for: - Deploy a Django app to Heroku or OpenShift without configuring external static file storage. - Serve CSS, JavaScript, and images from a containerized Python application without nginx. - Simplify local development by eliminating separate static file server setup. - Reduce deployment complexity for small-to-medium traffic sites by bundling static serving. - Enable gzip and Brotli compression of static assets with automatic header management. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. WhiteNoise serves static files directly from a Python WSGI application without requiring a separate web server or CDN, handling compression, caching headers, and best practices automatically. Yes. WhiteNoise is production-stable, actively maintained, has zero security vulnerabilities, requires no external dependencies, and solves a common deployment pain point. Install it if you are deploying a WSGI or Django application to a managed platform or containerized environment where you want static files bundled with the app. ## Install pip install whitenoise uv add whitenoise poetry add whitenoise ## Installing whitenoise Before you install: Low install friction with no runtime dependencies. Actively maintained as of 2026-02-27 with recent commits, and marked Production/Stable. License in practice: MIT license permits commercial and private use with minimal restrictions—straightforward permissive terms suitable for most projects. Quickstart: pip install whitenoise==6.12.0 from whitenoise import WhiteNoise app = WhiteNoise(application, root='staticfiles') Requires Python 3.10 or later; application must be WSGI-compatible. Verify before relying: - Performance comparison with dedicated static file servers under high traffic loads. - Specific CDN integration patterns and recommended configurations. - Exact performance characteristics when serving compressed content formats. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 16.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags static file serving python wsgi, django static files middleware, self-contained web app deployment, gzip brotli compression wsgi, heroku paas static files, python web app static assets, wsgi static file middleware, wsgi-middleware, static-files, deployment-simplification [View on SkillFed](https://skillfed.io/packages/whitenoise) · [View on PyPI](https://pypi.org/project/whitenoise/)