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.dev2241213103971001004.tar.gz.

File metadata

File hashes

Hashes for python_strtobool-1.0.3.dev2241213103971001004.tar.gz
Algorithm Hash digest
SHA256 0c026bd26179d10a7ff995e13b9e9664a75ce3d45d36cd4f9140763e08b0918d
MD5 0e1fe79b92081ddbe19957ca6762c7df
BLAKE2b-256 e744661eb7c2d43b42bcb898a1d38b95f217391831340ea6a79c064d2d30c5e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_strtobool-1.0.3.dev2241213103971001004.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.dev2241213103971001004-py3-none-any.whl.

File metadata

File hashes

Hashes for python_strtobool-1.0.3.dev2241213103971001004-py3-none-any.whl
Algorithm Hash digest
SHA256 825bad705fe7eee093c201745426f160f38ebbba2c260675ba7ccb985bcf9385
MD5 e331f6a665ff903fd8277b36ca492ac0
BLAKE2b-256 517b6fef937f438a70440a446e4964562f4fa06a53d0f0562d5db9cbdf040379

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_strtobool-1.0.3.dev2241213103971001004-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