Runner-Reloader for development
Project description
===============
Runner-Reloader
===============
Runner for development code.
Usage
=====
.. code:: shell
$ 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
Simple
------
.. code:: shell
$ 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.
Signal
------
The process rr receives a signal SIGUSR1 for starting reload process.
Installation
============
.. code:: shell
$ pip install rr
Settings
========
File ``.rr`` in current directory parsed for settings.
rr uses the `zini <https://github.com/zzzsochi/zini>`_ library for this.
:command: command for run
:interval: interval between scan directory
:exclude: list of excluded directories for scan
:loglevel: `loglevel <https://docs.python.org/3/howto/logging.html#logging-levels>`_ for rr
Command line arguments has a higher priority than settings.
For example:
~~~~~~~~~~~~
.. code:: ini
[default]
command = 'ping 8.8.8.8'
interval = 5s
loglevel = 'DEBUG'
exclude =
'*/__pycache__'
'.git'
'node_modules'
'build'
'dist'
Runner-Reloader
===============
Runner for development code.
Usage
=====
.. code:: shell
$ 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
Simple
------
.. code:: shell
$ 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.
Signal
------
The process rr receives a signal SIGUSR1 for starting reload process.
Installation
============
.. code:: shell
$ pip install rr
Settings
========
File ``.rr`` in current directory parsed for settings.
rr uses the `zini <https://github.com/zzzsochi/zini>`_ library for this.
:command: command for run
:interval: interval between scan directory
:exclude: list of excluded directories for scan
:loglevel: `loglevel <https://docs.python.org/3/howto/logging.html#logging-levels>`_ for rr
Command line arguments has a higher priority than settings.
For example:
~~~~~~~~~~~~
.. code:: ini
[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.2.0.tar.gz
(4.5 kB
view details)
Built Distribution
rr-0.2.0-py3-none-any.whl
(7.1 kB
view details)
File details
Details for the file rr-0.2.0.tar.gz
.
File metadata
- Download URL: rr-0.2.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67f74615f77a4ada3ca6f178dc7c55d1f8445daefe1933fec545cccf7496298c |
|
MD5 | 435605100a757ca2d9db1f1caf73b37c |
|
BLAKE2b-256 | 2fbda9b348028ea87efcc2b09f50f546e40024fe113a01356f6a6e1087ce972c |
File details
Details for the file rr-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: rr-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3dd40fdaab6c4497545301844219f0bac602515ba2a5e46ca7f34d364a781a7 |
|
MD5 | 286198ab649f46fb592ee6c7a88a116d |
|
BLAKE2b-256 | 2f96b54e741d48fa87b7dbdd7940767cf1ca9e841cbfee87c958aef9e38973d7 |