Skip to main content

Runner-Reloader for development

Project description

Runner for development code.

Usage

$ rr --help
usage: rr [-h] [--interval INTERVAL] [--exclude EXCLUDE]
          [--loglevel {NOTSET,DEBUG,INFO,WARNING,ERROR,CRITICAL}]
          ...

Runner-Reloader for development

positional arguments:
  command               command

optional arguments:
  -h, --help            show this help message and exit
  --interval INTERVAL, -i INTERVAL
                        interval for check
  --exclude EXCLUDE, -e EXCLUDE
                        exclude pattern
  --loglevel {NOTSET,DEBUG,INFO,WARNING,ERROR,CRITICAL}
                        loglevel for rr

$ rr --interval=10 my-app serve --listen=0.0.0.0:8080

This command launch my-app serve --listen=0.0.0.0:8080 and scan current directory for changed files every ten seconds. If some files was changed, application authomatically restarted.

This is usable for development docker containers.

Installation

$ pip install rr

Settings

File .rr in current directory parsed for settings. rr uses the zini library for this.

command:

command for run

interval:

interval between scan directory

exclude:

list of excluded directories for scan

loglevel:

loglevel for rr

Command line arguments has a higher priority than settings.

For example:

[default]
command = 'ping 8.8.8.8'
interval = 5s
loglevel = 'DEBUG'
exclude =
    '*/__pycache__'
    '.git'
    'node_modules'
    'build'
    'dist'

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

rr-0.1.0.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

rr-0.1.0-py3-none-any.whl (6.9 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