Pearun
A simple utility to run user defined commands.
Inspired by scripts in package.json of npm based projects.
Install package
pip install pearun
Usage
User commands are parsed from Pearunfile which contains simple json dictionary.
It is possible to run inline shell commands or execute whole script files.
With your Pearunfile ready, you can list your commands by:
pearun -l or pearun --list
Or with -f/--file argument when your Pearunfile is not in your CWD:
pearun -f <path_to_Pearunfile> or pearun --file <path_to_Pearunfile>
To execute your command, simply type its name as an argument:
pearun hello_world
You can also append custom command line arguments after the command name:
pearun script:default my_custom_args
Pearunfile example
{
"hello_world": "echo \"Hello World!\"",
"script:default": "./script.sh",
"script:with_arg": "./script.sh some_arg",
"boolean": "echo \"TRUE/FALSE\"",
"pyth": "python -c \"print(1 + 1)\""
}
See examples/ folder to try this Pearunfile.
Metadata
Release files for pearun 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pearun-1.0.0.tar.gz | 3.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pearun-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.6 kB
Release files / pearun-1.0.0.tar.gz
| Download URL | pearun-1.0.0.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cfc51a90f91336f633f81588b65d8389e2781f2e5e5ddbb6ed1a3836d72cf2cf
|
|
BLAKE2b-256 checksum How to use checksums |
78cb5c741a8b3452d17485465c4554439143513c9148ce71edb220f8e4efb774
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9
|
Release files / pearun-1.0.0-py3-none-any.whl
| Download URL | pearun-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b4d99df8305baecbde6c97de3df68fd90a40dc6f6f3f196f89531edbb1db4ab
|
|
BLAKE2b-256 checksum How to use checksums |
539eff4b765655eb569367d1b1871809fb65a5cef15c4c37fe5204682fe8ca8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9
|