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 details)
Built Distribution
File details
Details for the file asbool-0.1.1.tar.gz
.
File metadata
- Download URL: asbool-0.1.1.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3a9fdc993e5661c120923ec7cac9f6ee8deaa34cce6311025dba96a309579ba |
|
MD5 | 8c22f29155ce871cfd2d0baab15b46c6 |
|
BLAKE2b-256 | b673406a9bc7e82c5b1bffd2c72b29b3bff1a9c037ebe9d96fc9a871654ff90d |
File details
Details for the file asbool-0.1.1-py2.py3-none-any.whl
.
File metadata
- Download URL: asbool-0.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dbf84bb93124eeb7d3620d0b86e9dd6a655ef4d0422be1715faed02bfcd212c |
|
MD5 | cecfa15de0112fbcfe7e5c58479e5c88 |
|
BLAKE2b-256 | e25bc6503a86d4659441b7419a7716623a37134b81f469fd78103bb95bae8bb4 |