I have use Click for some years now.
Has some strong features that other tool in this category may lack.
Quick demo of sorting some input from command line.
As Click has good Setuptools Integration.
Has some strong features that other tool in this category may lack.
Quick demo of sorting some input from command line.
import click @click.command() @click.option('-q', '--quick', type=str, help='Sort text input') def my_sort(quick): lst = list(quick) lst = sorted(lst) click.echo(''.join(lst)) if __name__ == '__main__': my_sort()Usage command line:
Output:λ my_sort --quick 9593912358439
1233345589999
λ my_sort -q 94567phron230hdrt9931
012334567999dhhnoprrt
λ my_sort --help
Usage: my_sort [OPTIONS]
Options:
-q, --quick TEXT Sort text input
--help Show this message and exit.
See that can call my_sort
without python
or .py
As Click has good Setuptools Integration.
from setuptools import setup setup( name='my_sort', version='0.1', py_modules=['my_sort'], install_requires=[ 'Click', ], entry_points=''' [console_scripts] my_sort=my_sort:my_sort ''', )