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
Release files for asbool 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| asbool-0.1.1.tar.gz | 1.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| asbool-0.1.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 5.2 kB
Release files / asbool-0.1.1.tar.gz
| Download URL | asbool-0.1.1.tar.gz |
|---|---|
| Size | 1.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a3a9fdc993e5661c120923ec7cac9f6ee8deaa34cce6311025dba96a309579ba
|
|
BLAKE2b-256 checksum How to use checksums |
b673406a9bc7e82c5b1bffd2c72b29b3bff1a9c037ebe9d96fc9a871654ff90d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / asbool-0.1.1-py2.py3-none-any.whl
| Download URL | asbool-0.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
3dbf84bb93124eeb7d3620d0b86e9dd6a655ef4d0422be1715faed02bfcd212c
|
|
BLAKE2b-256 checksum How to use checksums |
e25bc6503a86d4659441b7419a7716623a37134b81f469fd78103bb95bae8bb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |