Integrated process monitor for developing and reloading daemons.
Project Links
Meta
Author: Michael Merickel
Requires Python: >=3.7
Classifiers
Development Status
- 5 - Production/Stable
Intended Audience
- Developers
License
- OSI Approved :: MIT License
Natural Language
- English
Programming Language
- Python :: 3
- Python :: 3.7
- Python :: 3.8
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: Implementation :: CPython
- Python :: Implementation :: PyPy
hupper is an integrated process monitor that will track changes to any imported Python files in sys.modules as well as custom paths. When files are changed the process is restarted.
Command-line Usage
Hupper can load any Python code similar to python -m <module> by using the hupper -m <module> program.
$ hupper -m myapp
Starting monitor for PID 23982.
API Usage
Start by defining an entry point for your process. This must be an importable path in string format. For example, myapp.scripts.serve.main.
# myapp/scripts/serve.py
import sys
import hupper
import waitress
def wsgi_app(environ, start_response):
start_response('200 OK', [('Content-Type', 'text/plain')])
yield b'hello'
def main(args=sys.argv[1:]):
if '--reload' in args:
# start_reloader will only return in a monitored subprocess
reloader = hupper.start_reloader('myapp.scripts.serve.main')
# monitor an extra file
reloader.watch_files(['foo.ini'])
waitress.serve(wsgi_app)
Acknowledgments
hupper is inspired by initial work done by Carl J Meyer and David Glick during a Pycon sprint and is built to be a more robust and generic version of Ian Bicking’s excellent PasteScript paste serve --reload and Pyramid’s pserve --reload.
1.12.1
Jan 26, 2024
1.12
Apr 02, 2023
1.11
Jan 03, 2023
1.10.3
May 13, 2021
1.10.2
Mar 02, 2020
1.10.1
Feb 18, 2020
1.10
Feb 18, 2020
1.9.1
Nov 12, 2019
1.9
Oct 15, 2019
1.8.1
Jun 12, 2019
1.8
Jun 12, 2019
1.7
Jun 05, 2019
1.6.1
Mar 11, 2019
1.6
Mar 07, 2019
1.5
Feb 16, 2019
1.4.2
Nov 26, 2018
1.4.1
Nov 11, 2018
1.4
Oct 26, 2018
1.3.1
Oct 05, 2018
1.3
May 21, 2018
1.2
May 02, 2018
1.1
Mar 29, 2018
1.0
May 18, 2017
0.5
May 11, 2017
0.4.4
Mar 10, 2017
0.4.3
Mar 08, 2017
0.4.2
Jan 24, 2017
0.4.1
Jan 03, 2017
0.4.0
Jan 03, 2017
0.3.6
Dec 18, 2016
0.3.5
Dec 18, 2016
0.3.4
Nov 22, 2016
0.3.3
Nov 20, 2016
0.3.2
Nov 16, 2016
0.3.1
Nov 07, 2016
0.3
Nov 06, 2016
0.2
Oct 27, 2016
0.1
Oct 21, 2016