ezcliy vs click

Note

click is definetly more mature (in dev since 2014) than ezcliy (2021). Don’t be surprised of lack some features.

Hello world comprasion

click

ez cliy

import click


@click.command()
@click.option('--count', default=1, help='Number of greetings.')
@click.option('--name', prompt='Your name', help='The person to greet.')
def hello(count, name):
    for _ in range(count):
        click.echo(f'Hello, {name}!')


if __name__ == '__main__':
    hello()
from ezcliy import Command, KeyVal, Positional


class Hello(Command):
    count = KeyVal('--count', default=1)
    count.description = 'Number of greetings.'
    hello_name = Positional('name', ask_if_missing='naem?')
    hello_name.description = 'The person to greet.'

    def invoke(self):
        for _ in range(int(self.count)):
            print(f'Hello, {self.hello_name}!')


if __name__ == '__main__':
    Hello().cli_entry()
_images/clickhw1.png _images/ezcliyhw1.png