Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Provides easy way to reload you server on code changes or another events

Project Description
Server Reloader

It is common task in all web frameworks — to provide an easy way to reload development
server on code changes. Most of these frameworks are carrying a reloader's code with
themselves. And there isn't any python module, simple enougth to use in a small project.

Some times ago, I started to write a chat bot called [TheBot][] and begun to look for
a separate server reloader's implementation. And found nothing suitable.

Then, I extracted autoreloader from the Django's codebase and put it into a separate
module, which README you are reading now. Code was partly modified, now it allows
not only to watch on file changes but also to reload upon a some event.

Reload on some event is a quite useful feature for [TheBot][], because now he can update
himself on a push to the GitHub. A pseudocode for this procedure will look like:

def on_push_to_the_github_master_branch():

And I don't need an external watcher to run bot, because now he uses [server-reloader][].

Example usage

Here is a simple example, how to use a reloader.

def run_server():
"""Some function, which creates and runs your server."""

def main():
before_reload=lambda: print('Reloading code…')

if __name__ == '__main__':

If you want to trigger code reloading on some custom event, then just do:

from server_reloader import trigger_reload


Many thanks to original authors of the autoreloader, I took as the basis.

Release History

Release History

This version
History Node


History Node


History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
server-reloader-0.1.3.tar.gz (4.7 kB) Copy SHA256 Checksum SHA256 Source Oct 30, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting