simple converter from ``str`` to ``bool``
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
asbool-0.1.1.tar.gz
(1.9 kB
view hashes)
Built Distribution
Close
Hashes for asbool-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dbf84bb93124eeb7d3620d0b86e9dd6a655ef4d0422be1715faed02bfcd212c |
|
MD5 | cecfa15de0112fbcfe7e5c58479e5c88 |
|
BLAKE2b-256 | e25bc6503a86d4659441b7419a7716623a37134b81f469fd78103bb95bae8bb4 |