friendly-arguments-0.1.0
توضیحات
Easy way to use named arguments by means of python dictionaries
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | friendly-arguments-0.1.0 |
| نام | friendly-arguments |
| نسخه کتابخانه | 0.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Horlando Leão |
| ایمیل نویسنده | horlandojcleao.developer@gmail.com |
| آدرس صفحه اصلی | https://github.com/Horlando-Leao/FriendlyArguments |
| آدرس اینترنتی | https://pypi.org/project/friendly-arguments/ |
| مجوز | MIT |
# FriendlyArguments
This python package makes it easy to use command line argument
## Example
**CODE** file: test_args.py
````python
# import friendly_arguments
from friendly_arguments.named import get_params_sys_args
# Make a function call, passing as an argument a list of strings,
# with the prefix '-' or '--' and the suffix '='. example '--arg1=' or '-arg1='
my_args: dict = get_params_sys_args(['--text='])
# validate your arguments as you wish
try:
text1 = my_args['--text=']
except KeyError:
raise ValueError('argumets --text= empty')
print(text1)
````
**RUN** on terminal
```shell
python test_args.py --text=hello_world
# or
python test_args.py --text="hello world"
```
نحوه نصب
نصب پکیج whl friendly-arguments-0.1.0:
pip install friendly-arguments-0.1.0.whl
نصب پکیج tar.gz friendly-arguments-0.1.0:
pip install friendly-arguments-0.1.0.tar.gz