{"id":27420,"library":"static3","title":"static3","description":"static3 is a simple WSGI middleware for serving static files (or mixed static/dynamic content). It is a fork of static with Python 3 support and additional features like arbitrary headers and precompressed content. Current version: 0.7.0. Release cadence is irregular; last release was in 2016.","status":"maintenance","version":"0.7.0","language":"python","source_language":"en","source_url":"https://github.com/rmohr/static3","tags":["wsgi","static-files","middleware","python3"],"install":[{"cmd":"pip install static3","lang":"bash","label":"Default install"}],"dependencies":[],"imports":[{"note":"static3 exposes the same API as the original static library.","symbol":"StaticMiddleware","correct":"from static import StaticMiddleware"},{"note":"Optional middleware for virus scanning.","symbol":"ClamAVMiddleware","correct":"from static import ClamAVMiddleware"}],"quickstart":{"code":"from wsgiref.simple_server import make_server\nfrom static import StaticMiddleware\n\napp = StaticMiddleware(my_wsgi_app, \"/static\", \"/path/to/static/files\")\n\nif __name__ == \"__main__\":\n    httpd = make_server(\"\", 8000, app)\n    print(\"Serving on port 8000...\")\n    httpd.serve_forever()","lang":"python","description":"Minimal WSGI server serving static files from /path/to/static/files at the /static URL prefix."},"warnings":[{"fix":"Use 'pip install static3' and import from 'static' module as before.","message":"static3 is a fork of the unmaintained static library. Ensure you install static3, not static, for Python 3 support.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'from static import StaticMiddleware'.","message":"The package name on PyPI is 'static3', but the import module is 'static'. Do not import 'static3' directly.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Change your import to 'from static import StaticMiddleware'.","cause":"The import module is named 'static', not 'static3'.","error":"ModuleNotFoundError: No module named 'static3'"},{"fix":"Run 'pip install static3' to install the Python 3 fork.","cause":"The package is not installed. You may have installed 'static' (the old, Python 2-only package) instead of 'static3'.","error":"ImportError: No module named 'static'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}