Skip to content

mrjulesfletcher/PythonDevRunner

Repository files navigation

PythonDevRunner

Auto-reload your Python app when source files change. Useful for development of web servers, CLI tools, or any script-driven workflow.

🚀 Features

  • Watches for changes in .py files
  • Automatically restarts your app
  • Logs the exact file that triggered the restart
  • Configurable via CLI or JSON file
  • Cross-platform support

🛠 Installation

📦 From PyPI

pip install PythonDevRunner

🧪 From source

git clone https://github.com/mrjulesfletcher/PythonDevRunner.git
cd PythonDevRunner
pip install .

💡 Usage

CLI

devrunner --entry main.py --watch-ext .py --exclude venv __pycache__ --debounce 0.5

Config file

devrunner --config examples/config.json

🔧 Configuration Options

Option CLI Flag Config Key Default
Entry script --entry entry main.py
Extensions --watch-ext watch_ext [".py"]
Exclude --exclude exclude []
Debounce --debounce debounce 0.5
Verbose --quiet quiet false

📝 Example Output

[Watcher] File changed: /myproject/chat_panel.py
[Runner] Restart triggered by: /myproject/chat_panel.py
[Runner] Launching main.py

📦 Packaging

Supports installation via pip install . or from PyPI.


License

MIT


Author

Created with ❤️ by Jules Le Masson
github.com/mrjulesfletcher

About

A file-watching auto-restart tool for Python app development.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages