pyreload / python

A little less restarting. A lot more building.

What’s next?

The Pyreload library

Find your next step.

Docs and guides, one search away.
UpDown MoveEnter Openesc Close

Not sure where to begin?

Start with a single file.

Run your app, save a change, and see it restart.

Read the quick start

Your code. Back in motion.

Save your file.
Stay in your flow.

A small watcher for your Python projects. Pyreload restarts your app when files change, even across Docker and Vagrant mounts.

Python 3.8+ · macOS, Linux & Windows · One command

~/your-next-projectpython

$ pip install pyreload-cli

Successfully installed pyreload-cli

$ pyreload app.py

Watching for changes in *.py

Hello, world.

app.py saved

Restarting due to file changes...

Hello, next idea.

pip install pyreload-cli
01 / THE FEEDBACK LOOPLess ceremony. More code.
Fits right into your workspace
PythonDockerBunFlox

A shorter loop

Make a change.
See what happens.

Keep your attention on the code. Pyreload handles the stop-and-start in between.

Try the quick start
  1. 01

    Point it at your app

    Run pyreload app.py in your project. Python files are watched by default.

  2. 02

    Edit. Save. Repeat.

    Matching changes stop the current process and start it again with your latest code.

  3. 03

    Make it your own

    Add watch patterns, ignore noisy files, or keep project defaults in a simple JSON file.

A command for your kind of work

Start where you are.

A script on your laptop. A module in a terminal. A folder mounted into a container. Pick a starting point and make it yours.

01 / READY TO RUN

Your script. A shorter loop.

Start in your project directory. Pyreload watches Python files recursively and restarts your script when a matching file changes.

Script quick start
app.pyterminal
pyreload app.py

Python files are watched by default.

Small tool. Useful details.

Built for the way you develop.

Mounts included.

When native events don’t make it through, polling keeps an eye on your Docker, Vagrant, and network folders.

Explore polling

Only what matters.

Watch Python, templates, or configuration. Ignore caches and generated files. Keep your defaults with the project.

Choose your patterns

Beyond a script.

Run a Python module or a shell command. Restart on demand with rs, or use clean mode when there’s no terminal input.

Run a command

Less noise. More intention.

Watch the work.
Skip the noise.

Templates count. Logs don’t have to. Keep your watch and ignore rules in a small JSON file, right next to your code.

Make it a project default

Save as .pyreloadrc in your project, then run pyreload app.py.

.pyreloadrc
{
  "watch": ["*.py", "*.html"],
  "ignore": ["*.log", "*__pycache__*"]
}

With these rules

app.pyRestarts
templates/index.htmlRestarts
debug.logIgnored
__pycache__/app.pycIgnored

A few things worth knowing

Small questions.
Clear answers.

Everything else is in the docs, from your first command to the details of process handling.

Explore the documentation
Do I need to change my application?

No. Run your existing script with pyreload app.py. Pyreload watches files from the current directory and manages restarting the child process.

Get started
Can I watch templates and configuration too?

Yes. Repeat --watch to include patterns such as *.html or *.yaml, or keep your watch and ignore lists in a project configuration file.

Choose watch patterns
What if changes in Docker are not detected?

Try --polling inside the container. Some mounted filesystems do not forward native change events. Polling checks for changes periodically, at the cost of additional CPU use.

Set up Docker
How do I restart without saving a file?

Type rs and press Enter in the running terminal. Type help for interactive commands. In clean mode, terminal input is disabled.

See interactive commands
Does this replace a production process manager?

Pyreload is built for the development loop. It restarts its immediate child process; it does not supervise a full process tree or provide production deployment orchestration.

Understand process handling

Your next save is the start

Less restarting.
More making.

pip install pyreload-cli
Installation guide