watson.dev.middleware¶
-
class
watson.dev.middleware.
StaticFileMiddleware
(app, initial_dir=None)[source]¶ A WSGI compatibile Middleware class that allows content to be retrieved from the directory that the __main__ is called from.
Example:
def app(environ, start_response): start_response('200 OK', [('Content-Type', 'text/plain')]) return [b'Hello World!'] my_app = StaticFileMiddleware(app)