str_to_bool function for Python
Project description
🐍 Python strtobool
Convert string to boolean value using str_to_bool
function.
🛠 Usage
from str_to_bool import str_to_bool
# Convert string to boolean value
value = str_to_bool('true')
📝 Supported values
All values are case-insensitive. Any value not listed below will raise a ValueError
.
True values
true
t
yes
y
on
1
False values
false
f
no
n
off
0
📦 Installation
Pip
pip install python-strtobool
Poetry
poetry add python-strtobool
📜 License
This project is released under the Apache-2.0 License. See the LICENSE file for more details.
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
python_strtobool-1.0.2.tar.gz
(5.8 kB
view hashes)
Built Distribution
Close
Hashes for python_strtobool-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 107d93760078a7b7eee91b455077fd6123fd94e6474815dfe306854cdfa47d70 |
|
MD5 | 3ae63fcff50944c563f697fa5316c9ac |
|
BLAKE2b-256 | 9151f2d9ea45c25440fad0937001395132a3303cef973c2c85143114910d4377 |