Skip to main content

simple converter from ``str`` to ``bool``

Project description

asbool is simple converter from str to bool.


use pip to install asbool.

pip install asbool


You can use asbool.asbool function simply.

>>> from asbool import asbool
>>> asbool('TRUE')

Or use AsBoolConverter instance with customized values.

>>> from asbool.converter import AsBoolConverter
>>> converter = AsBoolConverter(['t'], ['f'])
>>> converter('t')
>>> converter('f')
>>> converter('true')
Traceback (most recent call last):
raise ValueError(ss)
ValueError: true

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for asbool, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size asbool-0.1.1-py2.py3-none-any.whl (3.3 kB) File type Wheel Python version 3.5 Upload date Hashes View
Filename, size asbool-0.1.1.tar.gz (1.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page