a package to convert the input value to a boolean type
Usage
pip install yors_pano_str_to_bool
from yors_pano_str_to_bool import to_bool,text_to_bool,invert_bool_text
to_bool('true') # True
to_bool('false') # False
to_bool('enable') # True
to_bool('disable') # False
to_bool('1') # True
to_bool('0') # False
to_bool(True) # True
to_bool(False) # False
text_to_bool('true') # True
text_to_bool('false') # False
text_to_bool('enable') # True
text_to_bool('disable') # False
text_to_bool('1') # True
text_to_bool('0') # False
text_to_bool('on') # True
text_to_bool('0ff') # False
invert_bool_text('true') # 'false'
invert_bool_text('false') # 'true'
invert_bool_text('enable') # 'disable'
invert_bool_text('disable') # 'enable'
invert_bool_text('1') # '0'
invert_bool_text('0') # '1'
invert_bool_text('on') # 'off'
invert_bool_text('0ff') # 'on'
author
ymc-github ymc.github@gmail.com
license
MIT or APACHE-2.0
Metadata
Release files for yors_pano_str_to_bool 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| yors_pano_str_to_bool-1.1.0.tar.gz | 2.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| yors_pano_str_to_bool-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.3 kB
Release files / yors_pano_str_to_bool-1.1.0.tar.gz
| Download URL | yors_pano_str_to_bool-1.1.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
665e2e1199e0af438c984fd6f17ff2c6576189cb2c17ab30336a1e11faa569a8
|
|
BLAKE2b-256 checksum How to use checksums |
8c668ff7d99ad5918ff7dfe390979132fac6fd123ab915795ec3abb8873b5abe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.10.6 Windows/10
|
Release files / yors_pano_str_to_bool-1.1.0-py3-none-any.whl
| Download URL | yors_pano_str_to_bool-1.1.0-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f8320e51dbb7f0914584786d5064c0ac4e0403250405efff62794b10e90e188
|
|
BLAKE2b-256 checksum How to use checksums |
78b20b3a7a890ed6e8001226dd023fc145e14549200e8cc048d80a4855fd0c04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.10.6 Windows/10
|