Registry / http-networking / static3

static3

JSON →
library0.7.0pypypiunverified

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.

pip install static3
INSTALL
IMPORT
SIG · STATIC3
S
static3
http-networkingpythonv0.7.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

StaticMiddleware
from static import StaticMiddleware
from static import StaticMiddleware

Minimal WSGI server serving static files from /path/to/static/files at the /static URL prefix.

from wsgiref.simple_server import make_server from static import StaticMiddleware app = StaticMiddleware(my_wsgi_app, "/static", "/path/to/static/files") if __name__ == "__main__": httpd = make_server("", 8000, app) print("Serving on port 8000...") httpd.serve_forever()
Debug
Known issues
gotchastatic3 is a fork of the unmaintained static library. Ensure you install static3, not static, for Python 3 support.
fix
Use 'pip install static3' and import from 'static' module as before.
affects: all
gotchaThe package name on PyPI is 'static3', but the import module is 'static'. Do not import 'static3' directly.
fix
Use 'from static import StaticMiddleware'.
affects: all
Upgrade
Version history
0.7.0latest on PyPI · released May 10, 2016
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
20
OpenAI (training)
1
Resources
static3 — pip install static3 · libregistry