Skip to main content

A tool for automatically reloading Python programs on file changes

Project description

Reloady

A hotreload cli that automatically reexecutes python files when it detects changes

Port of Jesper's SourceChangeMonitor.py to python 3

Instructions on how to use are here ( or on Wayback machine, just in case.. )

Installation

pip install reloady

Use cases

This package is a command line tool that can be used to automatically restart a python program when it detects changes in the source code. It is designed to be used in development environments where you want to make changes to your code and see the results immediately without manually restarting the program. Some examples use cases are:

  • competitions where you want to make changes to your code and see the results immediately.
  • training for problems on leetcode or codewars where you want to make changes to your code and see the results instantly.
  • debugging problems in a running program by making changes to the code and seeing the results immediately.
  • visualizing the output of a program in real time. examples/printer.py is an example of a program that visualizes the output of a program in real time.

Reloady Demo

P.S. cli command has been renamed from pyreload to reloady

Usage

reloady your_program.py

with arguments

reloady main.py arg1 arg2

examples

Two Sum problem

cd examples/two_sum
reloady main.py

In this example, the program will automatically restart when changes are detected in either main.py or two_sum.py. main.py will test all cases in input.txt and compare the output with output.txt.

Colored Text example

cd examples/printer
reloady main.py

In this example, the program will automatically restart when changes are detected in either main.py or printer.py.

It is usefule to see how the colored text will look like without having to run the program manually for each change.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reloady-0.1.7.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

reloady-0.1.7-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file reloady-0.1.7.tar.gz.

File metadata

  • Download URL: reloady-0.1.7.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Windows/10

File hashes

Hashes for reloady-0.1.7.tar.gz
Algorithm Hash digest
SHA256 a0464320321e1874f3895c4293144688993920f5275f871d309d4a0dd37f8c47
MD5 095fe01d164f25f3ae50464b8f07f6b9
BLAKE2b-256 8f5280f20d325860a84c365ae487d2a0f8e66ca504fcae9082ee48092a035bd6

See more details on using hashes here.

File details

Details for the file reloady-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: reloady-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Windows/10

File hashes

Hashes for reloady-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 13bcda40348c501fe2a1fc734a734544cad7d551912404140aaa1af89ccdbe3b
MD5 f7ca5860e339be07819f183d2ecfc363
BLAKE2b-256 843ae9d41c3317e8d6fb55bedd0ecc304782fc45f0f2b06eadb3d6cffc5120b3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page