servestatic
Production-grade static file server for Python WSGI & ASGI.
Decision gist · record as of 2026-08-14
Yes. ServeStatic is production-stable, actively maintained, has no known vulnerabilities, and solves a real deployment problem—especially on PaaS platforms. The single lightweight dependency and low install friction make it a practical choice. Use it if you need static file serving without external infrastructure; skip it if you already have Nginx or S3 in your stack.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; asgiref must be installed as a runtime dependency.
- Low friction: single pure-Python dependency (asgiref), wheel-only distribution, and active maintenance with a recent release 68 days ago.
- Supports Python 3.10 through 3.14.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) allows free use, modification, and distribution in commercial and private projects with minimal restrictions.
last release 2026-06-07 (68 days) · last repo commit 2026-07-14 · 98 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 179,423 downloads/mo, #10,172 on PyPI
Alternatives
Verify before relying
pip install servestatic
from servestatic import ServeStaticMiddleware
app = ServeStaticMiddleware(app, root='staticfiles')- Whether the package's performance claims (dictionary lookup, sendfile syscall) are verified under real-world load.
- Specific CDN providers tested or recommended for optimal caching behavior.
- Whether Django auto-configuration features are documented with examples.
- Compression format support (gzip, brotli, zstd) and their default enablement.
What it is and what it does
ServeStatic is a static file server middleware for Python web applications that handles compression, cache headers, and CDN integration automatically. It works as a drop-in middleware for ASGI and WSGI apps, or as a standalone server, and is designed to simplify deployments on platforms like Heroku and OpenShift where external services are unavailable or undesirable.
The package pre-computes file metadata and headers at initialization, then serves requests with minimal overhead. It automatically handles Accept-Encoding negotiation, sets far-future cache headers for immutable files, and integrates with CDNs to ensure the vast majority of traffic bypasses your application entirely. A CLI provides utilities for multi-format compression, filename hashing, and manifest generation. Django users get extra auto-configuration features.
Use it for
- Deploy a Django or FastAPI app to Heroku or OpenShift without managing a separate Nginx instance.
- Serve static assets behind a CDN with automatic cache-busting via filename hashing.
- Eliminate S3 push-based deployment complexity by serving static files directly from your app with CDN caching.
- Automatically compress and serve gzip or brotli variants of CSS and JavaScript based on client Accept-Encoding.
- Run a self-contained production app that handles both dynamic content and static files without external dependencies.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
ServeStatic is production-stable, actively maintained, has no known vulnerabilities, and solves a real deployment problem—especially on PaaS platforms. The single lightweight dependency and low install friction make it a practical choice. Use it if you need static file serving without external infrastructure; skip it if you already have Nginx or S3 in your stack.
Install
servestatic on PyPI
Before you install
Low friction: single pure-Python dependency (asgiref), wheel-only distribution, and active maintenance with a recent release 68 days ago. Supports Python 3.10 through 3.14.
Requires Python 3.10 or later; asgiref must be installed as a runtime dependency.
License in practice
MIT license (permissive) allows free use, modification, and distribution in commercial and private projects with minimal restrictions.
Quickstart
pip install servestatic
from servestatic import ServeStaticMiddleware
app = ServeStaticMiddleware(app, root='staticfiles')
Verify before relying
- Whether the package's performance claims (dictionary lookup, sendfile syscall) are verified under real-world load.
- Specific CDN providers tested or recommended for optimal caching behavior.
- Whether Django auto-configuration features are documented with examples.
- Compression format support (gzip, brotli, zstd) and their default enablement.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageasgiref |
| Maintenance | Actively maintained 68 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 179,423 / month, #10,172 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableFramework :: DjangoIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Communications :: File SharingTopic :: Internet :: WWW/HTTPTopic :: Internet :: WWW/HTTP :: WSGI :: Middleware |
Evidence: servestatic-4.3.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “asgi wsgi static files”
- servestaticServeStatic serves static files efficiently from Python ASGI/WSGI…
- a2wsgiConverts between WSGI and ASGI applications bidirectionally without…
- granianGranian is a Rust-based HTTP server that runs ASGI, RSGI, and WSGI…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also whitenoise · django-heroku · static3 · dj-static · gunicorn · granian · brotli-asgi · Flask-Compress · a2wsgi · pypiserver