Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

py-hot-reload

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

py-hot-reload

Python Hot Reload starts the given program and reloads it whenever any file changes in the current directory or imported modules.

  • 1.0.6
  • PyPI
  • Socket score

Maintainers
1

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)

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc