معرفی شرکت ها


commandlet-0.4.4


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Werkzeug-style command parsing.
ویژگی مقدار
سیستم عامل -
نام فایل commandlet-0.4.4
نام commandlet
نسخه کتابخانه 0.4.4
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Chris Norman
ایمیل نویسنده chris.norman2@googlemail.com
آدرس صفحه اصلی https://github.com/chrisnorman7/
آدرس اینترنتی https://pypi.org/project/commandlet/
مجوز MPL-2
# commandlet Werkzeug-style commands. ## Usage ``` from commandlet.parser import Parser p = Parser() @p.command('test', 'test <int:times> <str:string>') def do_test(times, string): """Test a certain number of times.""" for n in range(times): print('[%d]: %s' % (n, string)) p.handle_command('test 4 Hello world.') ``` As you can see, you can decorate functions with the Parser.command decorator to make them callable. They should all be given a name (used for pretty-printing mainly), and an argument string, which looks very similar to those seen in command line programs... And [Werkzeug](https://palletsprojects.com/p/werkzeug/). You can also add extra filters: ``` @p.filter('reverse') def do_reverse(text): return (text, ''.join(reversed(text))) @p.command('reverse', 'reverse <reverse:string>') def reverse_command(string): original, new = string print('Reversing %r gives %r.' % (original, new)) ``` You can see the full list of filters by examining the Parser.filters dictionary. By default, str, int, and float are supported.


نیازمندی

مقدار نام
- attrs


نحوه نصب


نصب پکیج whl commandlet-0.4.4:

    pip install commandlet-0.4.4.whl


نصب پکیج tar.gz commandlet-0.4.4:

    pip install commandlet-0.4.4.tar.gz