Skip to main content
https://travis-ci.org/aodag/asbool.svg?branch=master

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.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asbool 0.2
File Size Uploaded
asbool-0.2.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for asbool 0.2
File Interpreter ABI Platform
asbool-0.2-py3-none-any.whl Python 3 none any Details

Total release size: 7.4 kB

Release files / asbool-0.2.tar.gz

Download URL asbool-0.2.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f2b79e8598a3f6c2e2599c643b109c510d19972c3fb81684e404983aadb7f953
BLAKE2b-256 checksum
How to use checksums
990e2c40bf7909e2161c083081a19332bec8e882dc7161b0f47c08ca2c4e25e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.0

Release files / asbool-0.2-py3-none-any.whl

Download URL asbool-0.2-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d223e24311914fe429b2c35f4d44e28592c42c8e3a76268adeebb582d0f1031
BLAKE2b-256 checksum
How to use checksums
cdd5ed7c21877339ecd7bde15dbe5ea8c9801df7356579335c678d3a2729108c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.0

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

0.1.1

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page