Skip to main content

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


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 details)

Uploaded Source

Built Distribution

python_strtobool-1.0.2-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file python_strtobool-1.0.2.tar.gz.

File metadata

  • Download URL: python_strtobool-1.0.2.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for python_strtobool-1.0.2.tar.gz
Algorithm Hash digest
SHA256 0c72ed5391e2aeef11bcbe754b96ed8770066000ea7ef0c2d33555c4538c6139
MD5 ea9c03ec37699dce213168c8afa0347a
BLAKE2b-256 3c88e84989e85aca194c9bcbf053985590376196a3d739b0afa8d4decac76875

See more details on using hashes here.

File details

Details for the file python_strtobool-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for python_strtobool-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 107d93760078a7b7eee91b455077fd6123fd94e6474815dfe306854cdfa47d70
MD5 3ae63fcff50944c563f697fa5316c9ac
BLAKE2b-256 9151f2d9ea45c25440fad0937001395132a3303cef973c2c85143114910d4377

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page