Skip to content
/ runwsgi Public

Simple WSGI development server with support for hot reloading

Notifications You must be signed in to change notification settings

oxan/runwsgi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

runwsgi: Simple WSGI development server

runwsgi is a simple WSGI development server with support for hot reloading, based upon wsgiref.

Usage

Run runwsgi with the filename or module name of your application:

# my_wsgi_app.py
def application(environ, start_response):
    start_response('200 OK', [('Content-Type', 'text/plain')])
    return [b'Hello world']
$ runwsgi --port 8080 my_wsgi_app.py

The HTTP port can also be specified using -p or left out, in which case port 8000 is used. You can use a virtualenv by running runwsgi with the Python from inside the virtualenv.

Hot reload

runwsgi automatically reloads any modules imported from the application directory (and subdirectories) when they are modified. Note that reloading is done using the importlib.reload function, and its documented caveats apply to runwsgi as well. Most notably this means that anything imported using the from ... import ... syntax will not be redefined on reload, and the old version will still be used.

About

Simple WSGI development server with support for hot reloading

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages