Python Hot Reload starts the given program and reloads it whenever any file changes in the current directory or imported modules.
Project description
Python Hot Reload
Python Hot Reload starts the given program and reloads it whenever any file changes in the current directory or imported modules.
Installation
You can install the Python Hot Reload from PyPI:
python -m pip install py-hot-reload
Python Hot Reload is supported on Python 3.6 and above.
How to use
Python Hot Reload has a command line implementation called py-hot-reload
. To see help message, call the program with -h, --help
:
$ py-hot-reload -h
Usage: py-hot-reload [OPTIONS] PYTHON_FILE
Options:
-V, --version Show the version and exit.
-C, --copyright Show the copyright and exit.
-v, --verbose Verbose.
-ep, --extra-patterns TEXT Extra patterns
-ip, --ignore-patterns TEXT Ignore patterns
-i, --interval INTEGER Interval
--add-current-folder-to-patterns
Add current folder to patterns.
--ignore-venv-and-python-lib Ignore venv and python lib.
-h, --help Show this message and exit.
To run ignoring certain patterns, run using -ip, --ignore-patterns
:
$ py-hot-reload -ip="*.txt;*/dir/*" <python-file>
To run with extra patterns, run using -ep, --extra-patterns
:
$ py-hot-reload -ep="*.txt;*/dir/*" <python-file>
You can also call the Python Hot Reload in your own Python code, by importing from the py_hot_reload
package:
import py_hot_reload
def main():
print(1)
py_hot_reload.run_with_reloader(main)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file py-hot-reload-1.0.6.tar.gz
.
File metadata
- Download URL: py-hot-reload-1.0.6.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09ef5ac863d0b2b776346527b3507751cdde4980dfda6504f7fcd451bab96905 |
|
MD5 | e5f8de17624d8c9c80066733f0fc5993 |
|
BLAKE2b-256 | 8a1d00e266e840ae1f73e8dcbf05174ba4f9cc08f37ec50b36eb09c829c6890a |
File details
Details for the file py_hot_reload-1.0.6-py3-none-any.whl
.
File metadata
- Download URL: py_hot_reload-1.0.6-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9a77538033e31ec3e633a1e3af0d4da4897916cf229b213e748d36f6cf3dfe0 |
|
MD5 | 1f8029f1420c2269274ede7e30cf7970 |
|
BLAKE2b-256 | 28c6fd1ee112b2d7618b554d9b0752ac053456b90140e25a61ab037de79863d9 |