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

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file python_strtobool-1.0.3.dev3241213103541005048.tar.gz.

File metadata

File hashes

Hashes for python_strtobool-1.0.3.dev3241213103541005048.tar.gz
Algorithm Hash digest
SHA256 3f59727342511678dec8ac5cf1cbd12c312be2ffeb90abe37612fd1cce702034
MD5 316c12acb90a5bd32cd31b1c51547b9d
BLAKE2b-256 94272d32bc7c05e47dcf76226da6b3c0c657304f1a57a2f38c66f067606b6336

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_strtobool-1.0.3.dev3241213103541005048.tar.gz:

Publisher: integration_delivery.yml on sassanh/python-strtobool

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file python_strtobool-1.0.3.dev3241213103541005048-py3-none-any.whl.

File metadata

File hashes

Hashes for python_strtobool-1.0.3.dev3241213103541005048-py3-none-any.whl
Algorithm Hash digest
SHA256 f958949e7f0b97b6370a199c9b14947f5b9193b4e489a8877a604ada013f49a3
MD5 ad7c298fa788f70e142ec18ee776eb70
BLAKE2b-256 d6387a3d29822f949074be690c6117003cf0d4f2f8f93c1a5a94bddba8322b18

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_strtobool-1.0.3.dev3241213103541005048-py3-none-any.whl:

Publisher: integration_delivery.yml on sassanh/python-strtobool

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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