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.1.tar.gz
(5.8 kB
view hashes)
Built Distribution
Close
Hashes for python_strtobool-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 149693118d1b989846eff8fef1cd8892acb90a469e380460f96f96fdc2af492b |
|
MD5 | 026050b4f5f63becf809c2edfd281370 |
|
BLAKE2b-256 | 25b66a0d19a15c92ae53d89a52f758dec9b57fedeb6daab8a8d53be86919f3e9 |