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.tar.gz
(1.9 kB
view details)
Built Distribution
asbool-0.1-py3-none-any.whl
(3.3 kB
view details)
File details
Details for the file asbool-0.1.tar.gz
.
File metadata
- Download URL: asbool-0.1.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3985b66c2c5e1dee3f07ee92060389a2126f80208d0fb872b56f5ecdb0353ddf |
|
MD5 | 35e32c37e8be2fb4f2223bff4c72265f |
|
BLAKE2b-256 | 051dd2d925b4331c91ea73d4faa6ae07562ee88834dbd3b6f4ab2b8be39fb39b |
File details
Details for the file asbool-0.1-py3-none-any.whl
.
File metadata
- Download URL: asbool-0.1-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2af12a91ae3efe6462c33ab1fbdf266cb08bc6fe0750a6e0d01542d6f60706cf |
|
MD5 | 48c3b8b4a0cc146a82f86721cdadf458 |
|
BLAKE2b-256 | 7240ac2da0492d2b60c26359a0cba731a6975ff35f381a73d4553ad6e3f1fbc9 |