Skip to main content

A simple file monitoring with code reloader for Python 3.

Project description

rload

A simple file monitoring with code reloader for Python 3.


Example

from rload import Rload, EventType

rload = Rload(__name__, ignored_paths=['__pycache__'])

@rload.on('change')
def handle_change(type: EventType, data: Dict):
    print(type, data)

@rload.on('reload')
def handle_reload(data):
    print('Reloading', data)

@rload.on('reloaded')
def handle_reloaded(data):
    print('Reloaded', data)

def test():
    print('This is a test')

if __name__ == "__main__":
    rload.run(target=test)

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

rload-0.0.2.tar.gz (6.9 kB view hashes)

Uploaded Source

Built Distribution

rload-0.0.2-py3-none-any.whl (11.8 kB view hashes)

Uploaded Python 3

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