cli-parser-0.1.3


توضیحات

Simple CLI Parser with command chaining
ویژگی مقدار
سیستم عامل -
نام فایل cli-parser-0.1.3
نام cli-parser
نسخه کتابخانه 0.1.3
نگهدارنده ['Ran Zvi']
ایمیل نگهدارنده ['ran.zvi@bluevine.com']
نویسنده Ran Zvi
ایمیل نویسنده ran.zvi@bluevine.com
آدرس صفحه اصلی https://github.com/ranzvi/cli_parser
آدرس اینترنتی https://pypi.org/project/cli-parser/
مجوز MIT
# CLI Parser ## Simple Chained Command Parser This tool will allow you to create a simple command hierarchy to execute from the command line. ### Example ```python from cli_parser import command, CliParser, ParentCommand, CommandException get = ParentCommand('get') @command def product(x, y): return x * y @command def sum(x, y): return x + y get.add_sub_cmds(product, sum) parser = CliParser([get]) while True: in_ = input("Enter command:\n==> ") try: response = parser.process_response(in_) print(response) except CommandException: pass ``` Execute your script from the command line: ``` Enter command: ==> get product 5 10 50 Enter command: ==> get sum 10 20 30 Enter command: ==> q 'Quitting Interpreter' ``` pypi: https://pypi.org/project/cli-parser/


زبان مورد نیاز

مقدار نام
>=3.6,<4.0 Python


نحوه نصب


نصب پکیج whl cli-parser-0.1.3:

    pip install cli-parser-0.1.3.whl


نصب پکیج tar.gz cli-parser-0.1.3:

    pip install cli-parser-0.1.3.tar.gz