Skip to main content

Robust WSGI auto-reloading for development.

Project description

Reload a WSGI application on source change. Keep the old code alive when the change has syntax errors. Never close the socket, never refuse a connection.

Replacement for ‘paster serve –reload config.ini’.

PID 4197 notifies us of a change in quux.py

quux.py changed; reloading...
{'status': 'changed', 'pid': 4197}

Oh no! We accidentally typed “foobar” instead of “import foobar”!

Process Process-4:
Traceback (most recent call last):
 ...
  File "quux.py", line 6, in <module>
    foobar
NameError: name 'foobar' is not defined

Can we visit our site? YES!:

127.0.0.1 - - [03/Mar/2010 09:41:52] "GET /orders HTTP/1.1" 200 2345

PID 4197 notifies us of /another/ change in quux.py

quux.py changed; reloading...
{'status': 'changed', 'pid': 4197}

We’ve fixed our problem. Once the new process loads, the old process quits silently

09:42:39,789 DEBUG [quux.run] App started.
{'status': 'loaded', 'pid': 4354}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ReloadWSGI-0.1dev.tar.gz (3.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page