Ez cliy
A hassle-free framework for creating command line tools
Install
from PyPi
pip3 install ezcliy
or from directly from Github
pip3 install git+https://github.com/kpostekk/ezcliy.git
More details in docs
Fast example
from ezcliy import Command, Flag # Import required classes
class SmallTextProcessor(Command):
# Define excpected parameters
capitalize = Flag('-c', '--capitalize')
verbose = Flag('--verbose')
def invoke(self): # There put your sweet code
string = ' '.join(self.values)
if self.verbose:
print('Verbose stuff', self.parameters, self.values)
if self.capitalize:
string = string.capitalize()
if not string.endswith('.'):
string += '.'
print(string)
if __name__ == '__main__':
SmallTextProcessor().cli_entry()
The exec of that will look like this
./somescript.py "this sentence require cap" -c --verbose
And output will be
Verbose stuff {'capitalize': <Flag -c --capitalize has value True>, 'verbose': <Flag --verbose has value True>} ['this sentence require cap']
This sentence require cap.
Metadata
Release files for ezcliy 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ezcliy-0.3.1-py3.9.egg | Legacy Egg format | - | - | Details |
| ezcliy-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.7 kB
Release files / ezcliy-0.3.1-py3.9.egg
| Download URL | ezcliy-0.3.1-py3.9.egg |
|---|---|
| Size | 7.3 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
2a49fbf4880e701d21a528cd9d18d5cd106e8dc15598dc73556fb3b172603107
|
|
BLAKE2b-256 checksum How to use checksums |
1acba6ca00c3f72fa085b9925f31eab706bc2b4cc2cb752e495563b49fd42984
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
|
Release files / ezcliy-0.3.1-py3-none-any.whl
| Download URL | ezcliy-0.3.1-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
54954904777316d8bda4ff3fa23bea7980ff51f6f990bf33cda381ccedf2e572
|
|
BLAKE2b-256 checksum How to use checksums |
986c542731d425a8bbcff96cb2f8b7fbe06795a67ffd710bf7318f98636f9010
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
|