Kommand!
This is your kommand!, this package is used to interactively control your function in CL.
Get started
Requirement:
- Python >= 3.6
- colorama (just for color in command line)
How to install kommand:
python setup.py install
How to use kommand:
# this will build json templates for your command information.
python -m kommand build
after that you just have to fill your command information in your json file.
{
"name": "myapp",
"version": "0.1",
"description": "kom test",
"author": "kzulfazriawan",
"email": "kzulfazriawan@gmail.com",
"your_command": {
"exec": "module_to_exec",
"help": "help information"
},
"your_command2": {
"exec": "module_to_exec2",
"help": "help information2"
}
}
In your script python you can add
from kommand import control
if __name__ == '__main__':
control(json_file='your_file.json')
# OR you can use with dictionary arguments
control(
name='your_project_name',
version='0.1',
your_command={'exec': 'your_module_exec', 'help': 'help information'},
your_command2={'exec': 'your_module_exec2', 'help': 'help information2'},...
)
Then start execute your script in command line:
python myscript.py
# to see help
python myscript.py help
# to execute
python myscript.py your_command your_command2
python myscript.py your_command2 your_command
python myscript.py your_command2
python myscript.py your_command
# if use parameter
python myscript.py your_command='p1,p2,...'
Metadata
Release files for kommand 1.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 | |
|---|---|---|---|
| kommand-1.0.tar.gz | 4.8 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kommand-1.0-py3.10.egg | Legacy Egg format | - | - | Details |
| kommand-1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.3 kB
Release files / kommand-1.0.tar.gz
| Download URL | kommand-1.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0c665a3211946a83eeb37ff6ea1190f2f8e197f8fa24d4c05e5394becc10ea5
|
|
BLAKE2b-256 checksum How to use checksums |
abf397dc5f21e391742b453cc5984a948be2bde54be3289c605c06e1bdefbbb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|
Release files / kommand-1.0-py3.10.egg
| Download URL | kommand-1.0-py3.10.egg |
|---|---|
| Size | 8.2 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
de5c02ba2394d47d5220c9d15343a73b0fc12dab8c3c2abad1ed24e76c9b664c
|
|
BLAKE2b-256 checksum How to use checksums |
27fabd99e981881b83214e1db7e9a54623ad4bf605a6a4ac041dd324fbcb084d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|
Release files / kommand-1.0-py3-none-any.whl
| Download URL | kommand-1.0-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc8abb63cd91c0607166efcec6422244dc7b77842cb971e4725982e8f9c759e2
|
|
BLAKE2b-256 checksum How to use checksums |
bc1e7eca492a1067c65e75eeb359b5a3215d854b24c7a209f481213dc3c9278f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|