A minimal and ridiculously good looking command-line-interface toolkit

Pyceo

Pyceo is a Python package for creating beautiful, composable, and ridiculously good looking command-line-user-interfaces without having to write any extra code.

  • Made for interfacing with humans.
  • Arbitrary nesting and composition of commands.
  • Automatic help page generation.
  • No need to redeclare paramaters and options with decorators, just write Python methods.
  • The help of a command is its docstring.

Usage

Declare a class that inherits from pyceo.Cli. Every method/attribute that does not starts with an underscore will be a command.

from pyceo import Cli

class Manage(Cli):
    def first_command(self, arg1, arg2=3):
        pass

    def second_command(self):
        pass

    def _not_a_command(self):
        pass

Then, instance that class and call it.

cli = Manage()

if __name__ == "__main__":
    cli()

The class dosctring will be printed at the beginning of the help page.

 

 

 

To finish reading, please visit source site