asbool-0.2
توضیحات
simple converter from ``str`` to ``bool``
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | asbool-0.2 |
| نام | asbool |
| نسخه کتابخانه | 0.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Atsushi Odagiri |
| ایمیل نویسنده | aodagx@gmail.com |
| آدرس صفحه اصلی | https://github.com/aodag/asbool |
| آدرس اینترنتی | https://pypi.org/project/asbool/ |
| مجوز | MIT, |
==================
asbool
==================
.. image:: https://travis-ci.org/aodag/asbool.svg?branch=master
:target: https://travis-ci.org/aodag/asbool
``asbool`` is simple converter from ``str`` to ``bool``.
INSTALL
======================
use pip to install ``asbool``.
::
pip install asbool
USAGE
==================
You can use ``asbool.asbool`` function simply.
::
>>> from asbool import asbool
>>> asbool('TRUE')
True
Or use ``AsBoolConverter`` instance with customized values.
::
>>> from asbool.converter import AsBoolConverter
>>> converter = AsBoolConverter(['t'], ['f'])
>>> converter('t')
True
>>> converter('f')
False
>>> converter('true')
Traceback (most recent call last):
...
raise ValueError(ss)
ValueError: true
نیازمندی
| مقدار | نام |
|---|---|
| - | six |
| - | pytest |
| - | pytest-cov |
| - | pytest-randomly |
نحوه نصب
نصب پکیج whl asbool-0.2:
pip install asbool-0.2.whl
نصب پکیج tar.gz asbool-0.2:
pip install asbool-0.2.tar.gz