bash
pip install pycli
python
import pycli
class MyCLI(pycli.CLI):
pass
python
import pycli
class MyCLI(pycli.CLI):
def command_hello(self):
print("Hello, world!")
def command_greet(self, name):
print("Hello,", name, "!")
python
import pycli
class MyCLI(pycli.CLI):
def command_hello(self):
print("Hello, world!")
def command_greet(self, name):
print("Hello,", name, "!")
if __name__ == "__main__":
MyCLI().run()
bash
python app.py hello
bash
python app.py greet John