ezflags-1.4.2
توضیحات
A tool that makes creating command line flags super easy.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | ezflags-1.4.2 |
| نام | ezflags |
| نسخه کتابخانه | 1.4.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | karx |
| ایمیل نویسنده | nerdstep710@gmail.com |
| آدرس صفحه اصلی | https://github.com/karx1/ezflags |
| آدرس اینترنتی | https://pypi.org/project/ezflags/ |
| مجوز | MIT |
ezflags
=======
.. image:: https://travis-ci.com/karx1/ezflags.svg?branch=master
:target: https://travis-ci.com/karx1/ezflags
.. image:: https://badge.fury.io/py/ezflags.svg
:target: https://badge.fury.io/py/ezflags
:alt: PyPI package
.. image:: https://readthedocs.org/projects/ezflags/badge/?version=latest
:target: https://ezflags.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
A tool that makes creating command line flags super easy.
Similar to `argparse <https://docs.python.org/3/library/argparse.html>`__,
switching is no problem at all! You can even use the FlagParserExtended as if it
were a normal ArgumentParser for full integration with existing
arguments.
Install with:
.. code:: bash
pip install ezflags
Here’s a simple example:
.. code:: py
# main.py
import ezflags
parser = ezflags.FlagParser()
parser.add_flag('--flag', '-f', value=True, help="A demo flag.")
flags = parser.parse_flags()
print(flags.flag)
To integrate with ArgumentParser:
.. code:: py
from ezflags.ext import FlagParserExtended
parser = FlagParserExtended()
parser.add_flag('--flag', '-f', value=True, help="A demo flag.")
parser.add_argument('--arg', '-a', help="A demo argument.")
args = parser.parse_args() # Flags are included, too!
print(args.flag)
print(args.arg)
This can be invoked as such:
.. code:: bash
python main.py --flag
# With ArgumentParser()
python main.py --flag --arg arg
View the full documentation
`here <https://ezflags.readthedocs.io/en/latest/>`__.
Supports
--------
Supports Python 3.6 and up.
License
-------
MIT license. See the
`LICENSE <https://github.com/karx1/ezflags/blob/master/LICENSE>`__ file
for more details.
نیازمندی
| مقدار | نام |
|---|---|
| - | sphinx |
| - | sphinx-rtd-theme |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl ezflags-1.4.2:
pip install ezflags-1.4.2.whl
نصب پکیج tar.gz ezflags-1.4.2:
pip install ezflags-1.4.2.tar.gz