str_to_bool function for Python
Project description
🐍 Python strtobool
Convert string to boolean value using str_to_bool
function.
🛠 Usage
from strtobool 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.0.tar.gz
(5.8 kB
view hashes)
Built Distribution
Close
Hashes for python_strtobool-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8207d1536ba22a9dd74e1511fe45c233723bb73c65f36686206f244a0239ec1 |
|
MD5 | ab5ff7ed628d71c19d1ea6150ea84e24 |
|
BLAKE2b-256 | 59eb8a3d3eae38faf5ff02533a67ccf2e981034c4e7d70938bd5bc7987f54ba9 |